Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/socrata_upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
# We use these schedules to determine the value of the `UPLOAD_SCHEDULE`
# env var below, so make sure to change that env var definition if you
# change any of these schedules.
#
#
# Run a monthly job on the first of every month at 11am UTC (6am UTC-5).
- cron: '0 11 1 * *'
# Run a semi-monthly job on the fifteenth of every month at 11am UTC (6am UTC-5).
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
# These cron expressions are shared by the `on.schedule` workflow
# attribute defined above, so make sure to change that attribute
# definition alongside any changes you make here
UPLOAD_SCHEDULE: >
UPLOAD_SCHEDULE: >-
${{ github.event.schedule == '0 11 1 * *' && 'monthly' ||
github.event.schedule == '0 11 15 * *' && 'semimonthly' || '' }}
run: python ./socrata/socrata_upload.py
8 changes: 7 additions & 1 deletion socrata/socrata_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,13 @@ def socrata_upload(asset_info, overwrite=False, years=None):


if __name__ == "__main__":
print(f"Running upload for event type: {os.getenv('WORKFLOW_EVENT_NAME')}")
event_type = " ".join(
filter(
None,
[os.getenv("UPLOAD_SCHEDULE"), os.getenv("WORKFLOW_EVENT_NAME")],
)
)
print(f"Running upload for event type: {event_type}")
Comment on lines +494 to +500
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just adding more printing here so it's easier to see what the script is being passed.


# Retrieve asset(s)
all_assets = parse_assets(os.getenv("SOCRATA_ASSET"))
Expand Down
Loading