rda-python-dsquasar 3.0.20__tar.gz → 3.0.21__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.
- {rda_python_dsquasar-3.0.20/src/rda_python_dsquasar.egg-info → rda_python_dsquasar-3.0.21}/PKG-INFO +1 -1
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/pyproject.toml +1 -1
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/dsquasar.py +21 -35
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21/src/rda_python_dsquasar.egg-info}/PKG-INFO +1 -1
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/LICENSE +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/MANIFEST.in +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/README.md +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/setup.cfg +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/__init__.py +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/ds_quasar.py +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/dsquasar.usg +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/dstacc.py +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/taccrec.py +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/tacctar.py +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar.egg-info/SOURCES.txt +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar.egg-info/dependency_links.txt +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar.egg-info/entry_points.txt +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar.egg-info/requires.txt +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar.egg-info/top_level.txt +0 -0
- {rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/test/test_dsquasar.py +0 -0
{rda_python_dsquasar-3.0.20/src/rda_python_dsquasar.egg-info → rda_python_dsquasar-3.0.21}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_dsquasar
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.21
|
|
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
|
{rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/dsquasar.py
RENAMED
|
@@ -23,7 +23,6 @@ import os
|
|
|
23
23
|
import re
|
|
24
24
|
import sys
|
|
25
25
|
import time
|
|
26
|
-
import signal
|
|
27
26
|
from os import path as op
|
|
28
27
|
from time import time as tm
|
|
29
28
|
from rda_python_common.pg_cmd import PgCMD
|
|
@@ -203,7 +202,7 @@ class DsQuasar(PgCMD, PgSplit):
|
|
|
203
202
|
self.cmdlog(self.PGBACK['cmd'])
|
|
204
203
|
self.PGBACK['starttime'] = tm()
|
|
205
204
|
self.set_walltime_deadline()
|
|
206
|
-
self.
|
|
205
|
+
self.catch_term_signal(self.batch_term_report)
|
|
207
206
|
if self.sopts['u']:
|
|
208
207
|
if self.sopts['a']: self.pglog("-u: Dataset IDs must be provided to Unlock datasets", self.LOGWRN)
|
|
209
208
|
self.unlock_datasets()
|
|
@@ -852,42 +851,29 @@ class DsQuasar(PgCMD, PgSplit):
|
|
|
852
851
|
self.PGLOG['CURBID'], self.seconds_to_string_time(self.WALLTIME),
|
|
853
852
|
self.seconds_to_string_time(self.MAXRUNTIME)), self.LOGWRN)
|
|
854
853
|
|
|
855
|
-
#
|
|
856
|
-
#
|
|
857
|
-
#
|
|
858
|
-
# it
|
|
859
|
-
#
|
|
860
|
-
#
|
|
861
|
-
|
|
862
|
-
if self.PGLOG['CURBID'] < 1: return
|
|
863
|
-
signal.signal(signal.SIGTERM, self.batch_term_handler)
|
|
864
|
-
|
|
865
|
-
# park a progress report and then die of the signal that was sent. this runs on borrowed
|
|
866
|
-
# time, so it does only what it must: no tar queue counts (two database queries we may
|
|
867
|
-
# not get to finish - the done count comes from memory), no dataset unlocking (the
|
|
868
|
-
# dscheck daemon already cleans up after a dead pid). the default handler is restored
|
|
869
|
-
# first so that a second signal, or the SIGKILL that follows, ends the run outright
|
|
870
|
-
# instead of re-entering here should the report hang.
|
|
854
|
+
# park a progress report for a run PBS is about to kill. catch_term_signal() arms this
|
|
855
|
+
# for a batch run only, restores the default handler before calling it, and re-raises
|
|
856
|
+
# the signal afterwards, so all this has to do is build the report.
|
|
857
|
+
# it runs on borrowed time (SIGKILL follows SIGTERM by the MoM's kill_delay, 10 seconds
|
|
858
|
+
# by default), so it does only what it must: no tar queue counts (two database queries
|
|
859
|
+
# we may not get to finish - the done count comes from memory), no dataset unlocking
|
|
860
|
+
# (the dscheck daemon already cleans up after a dead pid).
|
|
871
861
|
# the report may have to be written from inside an interrupted database call; that is
|
|
872
862
|
# why it goes through report_dscheck_email, whose cache_customized_email falls back to
|
|
873
863
|
# sending the mail directly when the UPDATE fails.
|
|
874
|
-
def
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
title = "dsquasar: {} terminated ({})".format(amsg, dmsg)
|
|
888
|
-
if self.PGBACK['errcnt']: title += " Error({})".format(self.PGBACK['errcnt'])
|
|
889
|
-
self.report_dscheck_email(title, 1)
|
|
890
|
-
os.kill(os.getpid(), signum)
|
|
864
|
+
def batch_term_report(self, signum, frame):
|
|
865
|
+
if self.PGBACK['einfo'] or not (self.PGBACK['doemail'] and self.PGLOG['DSCHECK']): return
|
|
866
|
+
etime = self.seconds_to_string_time(int(tm() - self.PGBACK['starttime']))
|
|
867
|
+
amsg = self.action_message()
|
|
868
|
+
dmsg = self.batch_done_count()
|
|
869
|
+
wmsg = self.seconds_to_string_time(self.WALLTIME)
|
|
870
|
+
self.pglog(self.INDENT + "{}: Terminated by signal {} after {} of the {} PBS walltime, {}".format(
|
|
871
|
+
amsg, signum, etime, wmsg, dmsg), self.LOGACT)
|
|
872
|
+
self.set_email("{}: {} terminated after {} of the {} PBS walltime, {}!".format(
|
|
873
|
+
self.PGBACK['cmd'], amsg, etime, wmsg, dmsg), self.EMLTOP)
|
|
874
|
+
title = "dsquasar: {} terminated ({})".format(amsg, dmsg)
|
|
875
|
+
if self.PGBACK['errcnt']: title += " Error({})".format(self.PGBACK['errcnt'])
|
|
876
|
+
self.report_dscheck_email(title, 1)
|
|
891
877
|
|
|
892
878
|
# email a report for a run under dscheck control. the progress report is parked in
|
|
893
879
|
# dscheck.einfo and the final report is sent right away. the run holds the check lock
|
{rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21/src/rda_python_dsquasar.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_dsquasar
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.21
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/__init__.py
RENAMED
|
File without changes
|
{rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/ds_quasar.py
RENAMED
|
File without changes
|
{rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/dsquasar.usg
RENAMED
|
File without changes
|
|
File without changes
|
{rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/taccrec.py
RENAMED
|
File without changes
|
{rda_python_dsquasar-3.0.20 → rda_python_dsquasar-3.0.21}/src/rda_python_dsquasar/tacctar.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|