Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Restrict all jobs to run only during the month of October. #706

Merged
merged 4 commits into from
Oct 23, 2020

Conversation

josephbhunt
Copy link
Contributor

Description

This PR is meant to close issue #435. It restricts all jobs in the sidekiq schedule to the month of October. This will effectively stop all jobs when Hacktoberfest is over. It happens automatically (no manual work), and it can be used again in subsequent years without any code changes.

Test process

I have not tested this, beyond confirming the crons in a cron generator. I'm not sure how. I suppose it could be tested in a QA environment by changing the system time, or the month of the cron, but I'll leave that up to maintainers to decide.

Requirements to merge

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • My changes generate no new warnings
  • [NA] I have added tests that prove my fix is effective or that my feature works
  • [NA] New and existing unit tests pass locally with my changes

config/sidekiq.yml Outdated Show resolved Hide resolved
config/sidekiq.yml Outdated Show resolved Hide resolved
config/sidekiq.yml Outdated Show resolved Hide resolved
@MattIPv4
Copy link
Member

The last user should move from waiting to a completed state on Nov 14th at 10am UTC.

Hacktoberfest also technically starts before October, so it might be simplest to just have all the jobs run for the duration of September, October and November.

@josephbhunt
Copy link
Contributor Author

@MattIPv4 I've updated the code to restrict jobs between setp and nov. If you want a more sophisticated solution I could try, but I think you're right that this is the simplest. Other solutions that I can think of involve ruby code checking if there are any users waiting. That just cuts the job short, but doesn't actually prevent the job from running and wouldn't make it much more efficient.

Copy link
Member

@MattIPv4 MattIPv4 left a comment

Choose a reason for hiding this comment

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

Lgtm

@MattIPv4
Copy link
Member

@katjuell could you just sanity check this, that nothing needs to keep running outside these months?

@katjuell
Copy link
Contributor

The only one I have questions about is the homepage_project_import job – do we want/need to be actively refreshing those once the event has ended? Also, I guess we should update the copy on that job to reflect the fact that it's running every 3 days, while we are here.

@MattIPv4
Copy link
Member

I think we should keep that job running with the others so that we aren't in a position where we might be suggesting lots of stale issues on the homepage. 👍

config/sidekiq.yml Outdated Show resolved Hide resolved
@katjuell
Copy link
Contributor

I left a comment on #711 regarding how we might frame/present issues once HF has ended, so that folks are not under the impression that work on these issues would count toward HF. Happy to continue the discussion over there, since it doesn't really have to do with this PR.

@MattIPv4
Copy link
Member

👍 Agreed that we probably need to update the copy, can be discussed/done in #711

Copy link
Member

@MattIPv4 MattIPv4 left a comment

Choose a reason for hiding this comment

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

Lgtm

config/sidekiq.yml Outdated Show resolved Hide resolved
config/sidekiq.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@katjuell katjuell left a comment

Choose a reason for hiding this comment

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

LGTM!

@MattIPv4 MattIPv4 merged commit 3e3c1e9 into Hacktoberfest:master Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants