uclibs / scholar_uc_legacy

Source code for Scholar@UC up to version 3.x. Replaced by ucrate
Other
5 stars 1 forks source link

Get embargo notifications working properly with embargo releases #1919

Closed hortongn closed 6 years ago

hortongn commented 6 years ago

Descriptive summary

The recently implemented embargo release rake task works fine, but it must run just before midnight to release the next day's embargoes. The notify task, however, is designed to run on the day the embargo expires. So by the time the notify task runs, the embargo has already been released and Scholar thinks no notifications need to be sent.

Adjust the notify rake task so that it sends out the notification 1 day prior instead of exactly on the embargo date.

crowesn commented 6 years ago

@scherztc @hortongn

So, I'm assuming we currently have two separate cron jobs for notification and release.

Can I propose a slight refactor to the rake tasks so that the :release task is called from the :notification task? Then we could consolidate cron jobs and be assured that both actions are happening in concert.

hortongn commented 6 years ago

Yes, we currently have two cron job that run the separate release and notify rake tasks.

I personally am indifferent as to whether we call separate tasks for each or if one calls the other. So I say go with what you think makes the most sense. You could also leave the two rake tasks alone and just create a third "release_and_notify" task that calls the other two rake tasks.

I think if I were going to have one task call another, I would have the release run before the notify. That way if something goes wrong with the release and the rake task ends prematurely, it will happen before emails go out to users. Not likely to happen, but possible.