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

Make cron respect timezone #1121

Closed
wants to merge 11 commits into from
Closed

Conversation

harimohanraj89
Copy link
Contributor

@harimohanraj89 harimohanraj89 commented Jun 30, 2020

Story card: https://www.pivotaltracker.com/story/show/173219451

Because

Timezone for cron jobs needs to be configurable, and cannot be read from Rails.application.config.countries, since the app environment is not loaded here.

This addresses

Loads the Rails env and sets the cron timezone based on the country config.

@harimohanraj89 harimohanraj89 temporarily deployed to simple-review-pr-1121 June 30, 2020 06:54 Inactive
Copy link
Contributor

@kitallis kitallis left a comment

Choose a reason for hiding this comment

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

We'll have to stick this env var in https://github.com/simpledotorg/deployment I presume?

@kitallis kitallis temporarily deployed to simple-review-pr-1121 June 30, 2020 06:56 Inactive
@harimohanraj89 harimohanraj89 temporarily deployed to simple-review-pr-1121 June 30, 2020 11:09 Inactive
@harimohanraj89
Copy link
Contributor Author

The env var is already populated in all environments, and the cron jobs will default to "Asia/Kolkata" if missing.

For Ethiopia, yes we are adding CRON_TIME_ZONE to the server configs in simpledotorg/deployment#225

@harimohanraj89 harimohanraj89 temporarily deployed to simple-review-pr-1121 June 30, 2020 11:35 Inactive
@kitallis kitallis temporarily deployed to simple-review-pr-1121 June 30, 2020 14:25 Inactive
@kitallis kitallis temporarily deployed to simple-review-pr-1121 June 30, 2020 14:49 Inactive
@kitallis kitallis temporarily deployed to simple-review-pr-1121 June 30, 2020 14:52 Inactive
@harimohanraj89 harimohanraj89 temporarily deployed to simple-review-pr-1121 July 1, 2020 08:29 Inactive
@harimohanraj89 harimohanraj89 changed the title Read cron timezone from env if available Make cron respect timezone Jul 1, 2020
@harimohanraj89 harimohanraj89 temporarily deployed to simple-review-pr-1121 July 1, 2020 08:37 Inactive
@harimohanraj89 harimohanraj89 temporarily deployed to simple-review-pr-1121 July 1, 2020 08:53 Inactive
@harimohanraj89
Copy link
Contributor Author

Closing in favor of #1125

harimohanraj89 added a commit that referenced this pull request Jul 1, 2020
**Story card:** https://www.pivotaltracker.com/story/show/173219451

### This PR is identical to #1121 , but the sempahore integration on #1121 is borked 😓 

## Because

Timezone for cron jobs needs to be configurable, and cannot be read from `Rails.application.config.countries`, since the app environment is not loaded here.

## This addresses

Loads the Rails env and sets the cron timezone based on the country config.
@kitallis kitallis deleted the ethiopia-config-tweaks branch December 31, 2020 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants