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

Embargo expiry job #526

Closed
mbarnett opened this issue Mar 1, 2018 · 5 comments
Closed

Embargo expiry job #526

mbarnett opened this issue Mar 1, 2018 · 5 comments
Assignees

Comments

@mbarnett
Copy link
Contributor

mbarnett commented Mar 1, 2018

We need to set up a Sidekiq job for scanning items with VISIBILITY_EMBARGO and whose embargo_end_date is < current date,and transition them to the post-embargo visibility. I believe there's also a requirement to push information regarding this change into the embargo_history attribute?

@murny
Copy link
Contributor

murny commented Apr 26, 2018

Need to investigate how to run this periodically/reoccurring? Job probably runs once a day and checks for any expired embargo_end_date. Need to use a cron job or use a cron-like gem to give this behaviour for us with sidekiq.

https://github.com/ondrejbartas/sidekiq-cron
https://github.com/javan/whenever
???
Enterprise Sidekiq has this :trollface:

@murny murny self-assigned this May 16, 2018
@murny
Copy link
Contributor

murny commented May 17, 2018

Is there a requirement for how often we want to be checking embargo dates? Every day? At 6 AM or something?

@mbarnett
Copy link
Contributor Author

Hydranorth did it at midnight IIRC

@murny
Copy link
Contributor

murny commented May 17, 2018

Looks like it was 10:01 PM? From digging into the ansible playbook here's the relevant section:

     - name: cronjob for remove embargoes
       cron: name="embargoes" hour=22 minute=1 job="cd /var/www/sites/hydranorth && RAILS_ENV={{rails_env}} bundle exec rake hydranorth:remove_lapsed_embargoes"
       tags: embargoes
       when: ansible_hostname == "bournemouth"

I guess we can agree it be daily. I'll make it 10 PM (no 1 minute cause that's silly) unless someone says otherwise

@murny murny mentioned this issue May 24, 2018
@murny
Copy link
Contributor

murny commented Jul 19, 2018

This is now in production. Closing issue

@murny murny closed this as completed Jul 19, 2018
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

No branches or pull requests

3 participants