Skip to content

Commit

Permalink
changes to init and function file
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchell Laferla committed Aug 22, 2023
1 parent debef21 commit 37e0cce
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
44 changes: 22 additions & 22 deletions monitoring_weekly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@ 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',
# 'weekly_autolinker_100_links_audit.py',
# 'weekly_insights_brand_monitoring.py',
# 'weekly_new_brand_combos.py',
# 'weekly_new_store_monitoring.py']
#list of scripts running in function, if adding new script add to list.
file_list = ['weekly_sama_reporting.py',
'weekly_autolinker_100_links_audit.py',
'weekly_insights_brand_monitoring.py',
'weekly_new_brand_combos.py',
'weekly_new_store_monitoring.py']

#batch_execution(file_list)
batch_execution(file_list)


run_script('weekly_sama_reporting.py')
run_script('weekly_autolinker_100_links_audit.py')
run_script('weekly_insights_brand_monitoring.py')
run_script('weekly_new_brand_combos.py')
run_script('weekly_new_store_monitoring.py')
# run_script('weekly_sama_reporting.py')
# run_script('weekly_autolinker_100_links_audit.py')
# run_script('weekly_insights_brand_monitoring.py')
# run_script('weekly_new_brand_combos.py')
# run_script('weekly_new_store_monitoring.py')
2 changes: 1 addition & 1 deletion monitoring_weekly/function.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"schedule": "0 5 * * MON"
}
],
"disabled": true
"disabled": false
}

0 comments on commit 37e0cce

Please sign in to comment.