Skip to content

Commit

Permalink
fix pynorms issues
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuang-jedi committed Aug 6, 2024
1 parent 1ee5492 commit 6d6231a
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions workflow/rocoto/workflow_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,21 @@ def _write_crontab(self, crontab_file: str = None, cronint: int = 5) -> None:
replyto = ''

strings = ['',
f'#################### {pslot} ####################',
f'MAILTO="{replyto}"'
]
# AWS need 'SHELL', and 'BASH_ENV' defined, or, the crontab job won't start.
f'#################### {pslot} ####################',
f'MAILTO="{replyto}"'
]
#AWS need 'SHELL', and 'BASH_ENV' defined, or, the crontab job won't start.
if os.environ.get('PW_CSP', None) in ['aws', 'azure', 'google']:
strings.extend([
f'SHELL="/bin/bash"',
f'BASH_ENV="/etc/bashrc"'
])
strings.extend([
f'{cronintstr} {rocotorunstr}',
'#################################################################',
''])
strings.extend(
[
f'SHELL="/bin/bash"',
f'BASH_ENV="/etc/bashrc"'
])
strings.extend(
[
f'{cronintstr} {rocotorunstr}',
'#################################################################',
''])

if crontab_file is None:
crontab_file = f"{expdir}/{pslot}.crontab"
Expand Down

0 comments on commit 6d6231a

Please sign in to comment.