Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

21622 - adding partners #1617

Merged
merged 4 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jobs/notebook-report/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Config(object):
ENVIRONMENT = os.getenv('ENVIRONMENT', '')
WEEKLY_REPORT_DATES = os.getenv('WEEKLY_REPORT_DATES', '[1]')
MONTHLY_REPORT_DATES = os.getenv('MONTHLY_REPORT_DATES', '[1]')
PARTNER_CODES = os.getenv('PARTNER_CODES', 'CSO,VS')
PARTNER_CODES = os.getenv('PARTNER_CODES', 'CSO,VS,RPT,ESRA')

# POSTGRESQL
PAY_USER = os.getenv('PAY_USER', '')
Expand Down
6 changes: 3 additions & 3 deletions jobs/notebook-report/notebookreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ def process_partner_notebooks(notebookdirectory: str, data_dir: str, partner_cod
except Exception: # noqa: B902
logging.exception('Error parsing monthly report dates for: %s', notebookdirectory)
send_email(notebookdirectory, 'ERROR', traceback.format_exc())
return
return

today = date.today().day
logging.info('Today\'s date: %s', today)
logging.info("Today\'s date: %s", today)

if notebookdirectory == 'daily':
logging.info('Processing daily notebooks for partner: %s', partner_code)
Expand Down Expand Up @@ -152,7 +152,7 @@ def process_notebooks(notebookdirectory: str, data_dir: str):
execute_notebook(notebookdirectory, data_dir)


def execute_notebook(notebookdirectory: str, data_dir: str, partner_code: str = None, is_monthly:bool = False):
def execute_notebook(notebookdirectory: str, data_dir: str, partner_code: str = None, is_monthly: bool = False):
"""Execute notebook and send emails."""
parameters = {'partner_code': partner_code} if partner_code else None
if is_monthly:
Expand Down