Schedule google_publish command in Heroku
Opened this issue · 3 comments
As an Administrator, I want Census Events to publish events regularly to Google Calendar, so that no human action is required to keep approved events on the public calendar.
Heroku Scheduler is similar to cron. You create a schedule to run a single command. The command would be python manage.py google_calendar
. Running every 10 minutes is probably a good start.
- This depends on #85, otherwise we'll have to do some cleanup to remove pending events from the calendar.
Acceptance criteria
- google_publish is run regularly on production
- documentation is updated to include any app-specific details to set this up for future deployments
I wonder if it is possible to just publish an event when it is approved. I don't think there is any great advantage to batching the updates to Google.
#5 is the issue for the feature you're referring to.
Yes it's possible. census.google_publish.google_publish_event will do it. You just need to test that it's not published yet.
I don't think this is necessary as we can publish as changes happen.