rda-python-dsarch 1.0.18__tar.gz → 1.0.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/PKG-INFO +1 -1
  2. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/pyproject.toml +1 -1
  3. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch/PgArch.py +25 -0
  4. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch/dsarch.py +8 -8
  5. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/PKG-INFO +1 -1
  6. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/LICENSE +0 -0
  7. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/MANIFEST.in +0 -0
  8. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/README.md +0 -0
  9. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/setup.cfg +0 -0
  10. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch/PgMeta.py +0 -0
  11. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch/__init__.py +0 -0
  12. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch/dsarch.usg +0 -0
  13. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/SOURCES.txt +0 -0
  14. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/dependency_links.txt +0 -0
  15. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/entry_points.txt +0 -0
  16. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/requires.txt +0 -0
  17. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/top_level.txt +0 -0
  18. {rda_python_dsarch-1.0.18 → rda_python_dsarch-1.0.20}/tests/test_dsarch.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dsarch
3
- Version: 1.0.18
3
+ Version: 1.0.20
4
4
  Summary: RDA Python package for utility program dsarch archive RDA data
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rda_python_dsarch"
7
- version = "1.0.18"
7
+ version = "1.0.20"
8
8
  authors = [
9
9
  { name="Zaihua Ji", email="zji@ucar.edu" },
10
10
  ]
@@ -693,6 +693,7 @@ def check_enough_options(cact, acts):
693
693
  if 'EM' not in PgOPT.params: PgLOG.PGLOG['LOGMASK'] &= ~PgLOG.EMLALL # turn off email if not yet
694
694
  PgOPT.PGOPT['emerol'] |= PgLOG.EXITLG
695
695
  # set command line Batch options
696
+ set_qsub_walltime()
696
697
  PgCMD.set_batch_options(PgOPT.params, 1)
697
698
  PgCMD.init_dscheck(0, '', "dsarch", PgOPT.params['DS'], cact, PgLOG.PGLOG['CURDIR'], PgOPT.params['LN'],
698
699
  PgOPT.params['BP'], PgOPT.PGOPT['emerol'])
@@ -700,6 +701,30 @@ def check_enough_options(cact, acts):
700
701
 
701
702
  PgSIG.start_none_daemon('dsarch', PgOPT.PGOPT['CACT'], PgOPT.params['LN'], 1, PgOPT.params['WI'], 1, PgOPT.params['AL'])
702
703
 
704
+ #
705
+ # set qsub walltime if needed
706
+ #
707
+ def set_qsub_walltime():
708
+
709
+ fcnt = 0
710
+ if 'LF' in PgOPT.params:
711
+ fcnt = len(PgOPT.params['LF'])
712
+ elif 'WF' in PgOPT.params:
713
+ fcnt = len(PgOPT.params['WF'])
714
+ else:
715
+ return
716
+
717
+ if 'GX' in PgOPT.params: fcnt *= 30
718
+ hr = int(fcnt/30000)
719
+ if hr == 6: return
720
+
721
+ if hr < 2:
722
+ hr = 2
723
+ elif hr > 24:
724
+ hr = 24
725
+ PgCMD.set_one_boption('qoptions', '-l walltime={}:00:00'.format(hr), 1)
726
+ return
727
+
703
728
  #
704
729
  # build local file list for given local directory and reset file sizes
705
730
  #
@@ -2040,7 +2040,7 @@ def restore_backup_savedfiles():
2040
2040
  if 'EM' in PgOPT.params: PgLOG.PGLOG['PRGMSG'] = ""
2041
2041
 
2042
2042
  #
2043
- # cross copy quasar backup files between Globus endpoints rda-quasar and rda-quasar-drdata
2043
+ # cross copy quasar backup files between Globus endpoints gdex-quasar and gdex-quasar-drdata
2044
2044
  #
2045
2045
  def crosscopy_backup_files():
2046
2046
 
@@ -2052,8 +2052,8 @@ def crosscopy_backup_files():
2052
2052
  s = 's' if ALLCNT > 1 else ''
2053
2053
  bidx = chksize = 0
2054
2054
  dflags = {}
2055
- bpoint = 'rda-quasar'
2056
- dpoint = 'rda-quasar-drdata'
2055
+ bpoint = 'gdex-quasar'
2056
+ dpoint = 'gdex-quasar-drdata'
2057
2057
  PgLOG.pglog("Cross Copy {} Quasar file{} of {} ...".format(ALLCNT, s, dsid), PgLOG.WARNLG)
2058
2058
 
2059
2059
  PgOPT.validate_multiple_values(tname, ALLCNT)
@@ -3326,7 +3326,7 @@ def set_one_backfile(i, pgrec, file, flds, type, ndsid = None, record = None):
3326
3326
  record['dsid'] = dsid
3327
3327
  record['uid'] = PgOPT.PGOPT['UID']
3328
3328
  if 'status' not in record: record['status'] = 'A'
3329
- info = PgFile.check_backup_file("/{}/{}".format(dsid, file), 'rda-quasar', 1, PgOPT.PGOPT['emerol'])
3329
+ info = PgFile.check_backup_file("/{}/{}".format(dsid, file), 'gdex-quasar', 1, PgOPT.PGOPT['emerol'])
3330
3330
  if info:
3331
3331
  if not info['isfile']: return PgLOG.pglog(file + ": is a directory", PgOPT.PGOPT['emlerr'])
3332
3332
  record['data_size'] = info['data_size']
@@ -4156,8 +4156,8 @@ def move_backup_files():
4156
4156
  tname = 'bfile'
4157
4157
  dsid = PgOPT.params['DS']
4158
4158
  dcnd = "dsid = '{}'".format(dsid)
4159
- bkend = "rda-quasar"
4160
- drend = 'rda-quasar-drdata'
4159
+ bkend = "gdex-quasar"
4160
+ drend = 'gdex-quasar-drdata'
4161
4161
  bidx = chksize = 0
4162
4162
 
4163
4163
  tmpds = None
@@ -4566,8 +4566,8 @@ def delete_backup_files():
4566
4566
  dsid = PgOPT.params['DS']
4567
4567
  dcnd = "dsid = '{}'".format(dsid)
4568
4568
  brec = {'bid' : 0}
4569
- bkend = "rda-quasar"
4570
- drend = "rda-quasar-drdata"
4569
+ bkend = "gdex-quasar"
4570
+ drend = "gdex-quasar-drdata"
4571
4571
  s = 's' if ALLCNT > 1 else ''
4572
4572
  PgLOG.pglog("Delete {} Backup file{} from {} ...".format(ALLCNT, s, dsid), PgLOG.WARNLG)
4573
4573
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dsarch
3
- Version: 1.0.18
3
+ Version: 1.0.20
4
4
  Summary: RDA Python package for utility program dsarch archive RDA data
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch