Skip to content

Commit

Permalink
trouble shooting to solve infinate loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchell Laferla committed Jul 7, 2023
1 parent 2cb6b56 commit b6e4e73
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions monitoring_weekly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ def run_script(script_name):
s.loader.exec_module(m)


def batch_execution(file_list):
# def batch_execution(file_list):

exceptions = [] #store errors
# exceptions = [] #store errors

for file in file_list:
try:
run_script(file)
except Exception as e:
exceptions.append(e)
else:
print('Success')
# for file in file_list:
# try:
# run_script(file)
# except Exception as e:
# exceptions.append(e)
# else:
# print('Success')

return exceptions
# return exceptions

# list of scripts running in function, if adding new script add to list.
file_list = ['weekly_sama_reporting.py',
Expand All @@ -46,8 +46,9 @@ def batch_execution(file_list):
'weekly_new_brand_combos.py',
'weekly_new_store_monitoring.py']

batch_execution(file_list)

#batch_execution(file_list)

for file in file_list:
run_script(file)


0 comments on commit b6e4e73

Please sign in to comment.