Skip to content

Commit

Permalink
add warning about number of processes
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Sep 10, 2024
1 parent 44722d2 commit ed5175d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 2 additions & 3 deletions bin/desi_tucson_transfer_catchup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ src=rsync://${DESISYNC_HOSTNAME}/desi
dst=${DESI_ROOT}
log_root=${HOME}/Documents/Logfiles
#
# Execute rsync commands.
# Execute rsync commands. Do not exceed 10 commands!
#
for d in engineering/focalplane engineering/focalplane/hwtables \
spectro/data \
spectro/redux/daily spectro/redux/daily/exposures spectro/redux/daily/preproc spectro/redux/daily/tiles \
spectro/nightwatch/kpno spectro/staging/lost+found \
software/AnyConnect software/CiscoSecureClient; do
spectro/nightwatch/kpno spectro/staging/lost+found; do
case ${d} in
engineering/focalplane) priority='nice'; exclude='--exclude archive --exclude hwtables --exclude *.ipynb --exclude .ipynb_checkpoints' ;;
engineering/focalplane/hwtables) priority='nice'; exclude='--include *.csv --exclude *' ;;
Expand Down
13 changes: 10 additions & 3 deletions py/desitransfer/tucson.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,15 @@ def main():
try:
foo = os.environ[e]
except KeyError:
log.error("%s must be set!", e)
log.critical("%s must be set!", e)
return 1

#
# Check other options.
#
if options.nproc > 10:
log.critical("Number of simultaneous transfers %d > 10!", options.nproc)
return 1
#
# Source and destination.
#
Expand All @@ -292,7 +299,7 @@ def main():
if 'DESI_ROOT' in os.environ:
dst = os.environ['DESI_ROOT']
else:
log.error("DESI_ROOT must be set, or destination directory set on the command-line (-d DIR)!")
log.critical("DESI_ROOT must be set, or destination directory set on the command-line (-d DIR)!")
return 1
else:
dst = options.destination
Expand All @@ -314,7 +321,7 @@ def main():
try:
sleepy_time = int(options.sleep[0:-1]) * suffix[s]
except ValueError:
log.error("Invalid value for sleep interval: '%s'!", options.sleep)
log.critical("Invalid value for sleep interval: '%s'!", options.sleep)
return 1
log.debug("requests.get('%s')", os.environ['DESISYNC_STATUS_URL'])
if not options.test:
Expand Down

0 comments on commit ed5175d

Please sign in to comment.