rda-python-dsquasar 1.0.4__tar.gz → 1.0.6__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.4
3
+ Version: 1.0.6
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.4"
7
+ version = "1.0.6"
8
8
  authors = [
9
9
  { name="Zaihua Ji", email="zji@ucar.edu" },
10
10
  ]
@@ -83,9 +83,10 @@ SOPT = 1
83
83
  WOPT = 2
84
84
  ORDERS = {} # cache current order number for each dsid
85
85
  BFILES = {} # cache current order number for each dsid
86
- BCKSIZE = 64424509440 # 60GB, dsglobus transfer size
87
- TARSIZE = 3221225472 # 3GB, tarfile size limit
88
- MINSIZE = PgLOG.PGLOG['ONEGBS'] # minimal tarfile size
86
+ BCKSIZE = 90*PgLOG.PGLOG['ONEGBS'] # 90GB, dsglobus transfer size
87
+ TARSIZE = 5*PgLOG.PGLOG['ONEGBS'] # 5GB, tarfile size limit
88
+ MINSIZE = PgLOG.PGLOG['TWOGBS'] # 2GB, minimal tarfile size
89
+ ONESIZE = 20*PgLOG.PGLOG['ONEGBS'] # 20GB, minimal file size to tar a single file
89
90
  TFCOUNT = 100 # if file count is greater, use MINSIZE for tar file
90
91
  SUBLMTS = 2000 # file count limit for a sub-group
91
92
 
@@ -899,7 +900,9 @@ def process_backup_files(qinfo, dsid, fcnt, recs, filetype):
899
900
  if not fd: fd = open_input_file(qinfo, dsid, filetype)
900
901
  fd.write(instr)
901
902
  qinfo['instr'] += instr
902
- if qinfo['fcnt'] < TFCOUNT:
903
+ if qinfo['fcnt'] == 1:
904
+ if qinfo['size'] < ONESIZE: continue
905
+ elif qinfo['fcnt'] < TFCOUNT:
903
906
  if qinfo['size'] < TARSIZE: continue
904
907
  else:
905
908
  if qinfo['size'] < MINSIZE: continue
@@ -1173,7 +1176,7 @@ def gather_dataset_files(dsfiles, dsids, unlock = True):
1173
1176
  dcnd = "dsid = '{}'".format(dsid)
1174
1177
  pgrec = PgDBI.pgget("dataset", "dsid, backflag, pid", dcnd, PgLOG.LGWNEX)
1175
1178
  if pgrec:
1176
- if unlock and pgrec['pid'] and PgLock.lock_dataset(dsid, 0, PgLOG.LGEREX) < 1: continue
1179
+ if unlock and pgrec['pid'] and PgLock.lock_dataset(dsid, 0, LOGACT) < 1: continue
1177
1180
  fcnt += get_dataset_files(dsid, dsfiles, pgrec['backflag'], PgLOG.LOGWRN)
1178
1181
  else:
1179
1182
  dcnd = "ORDER BY dsid"
@@ -1181,7 +1184,7 @@ def gather_dataset_files(dsfiles, dsids, unlock = True):
1181
1184
  dcnt = len(pgrecs['dsid']) if pgrecs else 0
1182
1185
  for i in range(dcnt):
1183
1186
  dsid = pgrecs['dsid'][i]
1184
- if unlock and pgrecs['pid'][i] and PgLock.lock_dataset(dsid, 0, PgLOG.LGEREX) < 1: continue
1187
+ if unlock and pgrecs['pid'][i] and PgLock.lock_dataset(dsid, 0, LOGACT) < 1: continue
1185
1188
  fcnt += get_dataset_files(dsid, dsfiles, pgrecs['backflag'][i])
1186
1189
 
1187
1190
  if dsfiles:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dsquasar
3
- Version: 1.0.4
3
+ Version: 1.0.6
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
@@ -1,4 +1,4 @@
1
- # test_hello_world.py
1
+ # test
2
2
 
3
3
  import pytest
4
4