rda-python-dsquasar 1.0.7__tar.gz → 1.0.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dsquasar
3
- Version: 1.0.7
3
+ Version: 1.0.8
4
4
  Summary: RDA Python package to backup and recover RDA data archives to and from GLOBUS Quasar backup server
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dsquasar
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rda_python_dsquasar"
7
- version = "1.0.7"
7
+ version = "1.0.8"
8
8
  authors = [
9
9
  { name="Zaihua Ji", email="zji@ucar.edu" },
10
10
  ]
@@ -345,14 +345,11 @@ def add_checksum_action(bopts, dsids, dstart):
345
345
  #
346
346
  def create_infile_action(bopts, dsids, dstart):
347
347
 
348
- if bopts and dstart > 0 and not PgLOG.PGLOG['DSCHECK']:
349
- fcnt = gather_dataset_files(None, dsids)
350
- dstart = start_dsquasar_none_daemon(bopts, dsids, CINACT, fcnt)
348
+ if dstart > 0: dstart = start_dsquasar_none_daemon(bopts, dsids, CINACT)
351
349
 
352
350
  dsfiles = {'B' : {}, 'D' : {}}
353
351
  fcnt = gather_dataset_files(dsfiles, dsids)
354
352
  if fcnt and dstart:
355
- if dstart > 0: dstart = start_dsquasar_none_daemon(bopts, dsids, CINACT, fcnt)
356
353
  backup_dataset_files(dsfiles, 'B')
357
354
  backup_dataset_files(dsfiles, 'D')
358
355
 
@@ -396,25 +393,8 @@ def start_dsquasar_none_daemon(bopts, dsids, act, fcnt = 0):
396
393
  dsid = dsids[0] if len(dsids) == 1 else ''
397
394
  if not re.match(r'^[a-z]\d{6}$', dsid): dsid = ''
398
395
  cact = ('A' if acts < 10 else '') + str(acts)
399
- if act == BCKACT:
400
- if acts&TARACT: fcnt += 2*gather_dataset_infiles(None, dsids)
401
- if acts&CINACT: fcnt += 2*gather_dataset_files(None, dsids)
402
- else:
403
- if act == TARACT and acts&CINACT: fcnt += gather_dataset_files(None, dsids)
404
- if acts&BCKACT: fcnt *= 2
405
- if act == STTACT: fcnt = gather_dataset_bckfiles(None, dsids, False)
406
-
407
396
  if act == STTACT or acts&NBACTS != acts:
408
- hr = fcnt/400
409
- if act&STTACT: hr /= 50
410
- if not act&TARACT: hr /= 2
411
- hr = int(hr)
412
- if hr != 6:
413
- mhr = int(PgLOG.PGLOG['PBSTIME']/3600)
414
- if hr > mhr: hr = mhr
415
- if hr < 2: hr = 2
416
- boptions = '-l walltime={}:00:00'.format(hr)
417
- PgCMD.set_one_boption('qoptions', boptions, 1)
397
+ PgCMD.set_one_boption('qoptions', '-l walltime=24:00:00', 1)
418
398
  PgCMD.init_dscheck(0, '', "dsquasar", dsid, cact, PGBACK['workdir'],
419
399
  PgLOG.PGLOG['CURUID'], bopts, PgLOG.LOGWRN)
420
400
  if PGBACK['mproc'] > 1: PGBACK['mproc'] = 1
@@ -423,7 +403,16 @@ def start_dsquasar_none_daemon(bopts, dsids, act, fcnt = 0):
423
403
 
424
404
  PgSIG.start_none_daemon('dsquasar', '', PgLOG.PGLOG['CURUID'], PGBACK['mproc'], 60, 1)
425
405
 
426
- if bopts != None:
406
+ if PgLOG.PGLOG['DSCHECK']:
407
+ if act == STTACT:
408
+ fcnt = gather_dataset_bckfiles(None, dsids, False)
409
+ elif act == BCKACT:
410
+ if acts&TARACT: fcnt += 2*gather_dataset_infiles(None, dsids)
411
+ if acts&CINACT: fcnt += 2*gather_dataset_files(None, dsids)
412
+ else:
413
+ if act == CINACT or act == TARACT and acts&CINACT:
414
+ fcnt += gather_dataset_files(None, dsids)
415
+ if acts&BCKACT: fcnt *= 2
427
416
  PgCMD.set_dscheck_fcount(fcnt, PgLOG.LGEREX)
428
417
  PgCMD.set_dscheck_dcount(0, 0, PgLOG.LGEREX)
429
418
  mstep = 100 if acts&NBACTS else 10
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dsquasar
3
- Version: 1.0.7
3
+ Version: 1.0.8
4
4
  Summary: RDA Python package to backup and recover RDA data archives to and from GLOBUS Quasar backup server
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dsquasar