Skip to content

Commit

Permalink
Updated waiting counter
Browse files Browse the repository at this point in the history
  • Loading branch information
PalNilsson committed Mar 17, 2022
1 parent d4047c3 commit 3150d81
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion PILOTVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2.20
3.2.2.22
12 changes: 5 additions & 7 deletions pilot/control/payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,15 +414,13 @@ def run_realtimelog(queues, traces, args):
except queue.Empty:
continue

# wait with proceeding until the job is running, or max 60 s
# wait with proceeding until the job is running, or max 5 * 60 s
counter = 0
while counter < 6:
while counter < 5 * 60 and not args.graceful_stop.is_set():
if job.state == 'running':
logger.debug('job is running, time to start real-time logger [if needed]')
break
else:
logger.debug('waiting for job to start running (before starting real-time logger)')
time.sleep(10)
time.sleep(1)
counter += 1

if args.use_realtime_logging:
Expand All @@ -433,7 +431,7 @@ def run_realtimelog(queues, traces, args):
logger.debug(f'debug={job.debug}')
logger.debug(f'debug_command={job.debug_command}')
logger.debug(f'args.use_realtime_logging={args.use_realtime_logging}')
if job.debug and not job.debug_command and not args.use_realtime_logging:
if job.debug and (not job.debug_command or job.debug_command == 'debug') and not args.use_realtime_logging:
logger.info('turning on real-time logging since debug flag is true and debug_command is not set')
job.realtimelogging = True

Expand All @@ -447,7 +445,7 @@ def run_realtimelog(queues, traces, args):
job.infosys.queuedata.catchall,
args.realtime_logname,
args.realtime_logging_server) if not info_dic and job.realtimelogging else info_dic
# logger.debug(f'info_dic={info_dic}')
logger.debug(f'info_dic={info_dic}')
if info_dic:
args.use_realtime_logging = True
realtime_logger = get_realtime_logger(args, info_dic, job.workdir, job.pilotsecrets)
Expand Down
2 changes: 1 addition & 1 deletion pilot/util/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
RELEASE = '3' # released number should be fixed at 3 for Pilot 3
VERSION = '2' # version number is '1' for first release, '0' until then, increased for bigger updates
REVISION = '2' # revision number should be reset to '0' for every new version release, increased for small updates
BUILD = '20' # build number should be reset to '1' for every new development cycle
BUILD = '22' # build number should be reset to '1' for every new development cycle

SUCCESS = 0
FAILURE = 1
Expand Down

0 comments on commit 3150d81

Please sign in to comment.