-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
Adding clockwork to recurrently fetch feeds #430
Conversation
@@ -27,6 +27,7 @@ end | |||
gem "activerecord", "~> 4.1.11" | |||
gem "arel", "~> 5.0" | |||
gem "bcrypt-ruby", "~> 3.1.2" | |||
gem "clockwork", "~> 1.2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we lock this gem at the major version, see c3e41b4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! :)
I can see this being a useful changeset. Thank you for your contribution! I'll give this a spin on my instance. |
Hmm... One issue with these changes is that for the app to be fully functional on Heroku without using the embedded workers, you would have to run three dynos. Heroku only allows for two concurrent Free-size dynos. Any thoughts on this? |
c204b95
to
91b1232
Compare
It will replace Scheduler (for deployment on Heroku), so that no extra step is needed due to another spawn command being called on unicorn.rb starting clockwork. Still on Heroku, Procfile is updated, describing the worker and clock components (if the user wants a more robust architecture). This fixes stringer-rss#411 Also, for development environments, it will allow fetching feeds without having to manually running rake commands. The default interval for fetching feeds is 10 min and it can be customized by env var FETCH_INTERVAL.
91b1232
to
d8995ee
Compare
@Koronen Why not using embedded workers on Heroku? That should work. Unless we use one dyno for the |
I'm not sure what adding |
I'm closing this pull request for lack of activity. |
This PR intends to add
clockwork
gem to recurrently fetch feeds.It will replace Scheduler (for deployment on Heroku), so that no extra step is needed due to another
spawn
command being called onunicorn.rb
startingclockwork
.Still on Heroku,
Procfile
is updated, describing theworker
andclock
components (if the user wants a more robust architecture). This fixes #411Also, for development environments, it will allow fetching feeds without manually running
rake
commands.The default interval for fetching feeds is 10 min and it can be customized by env var
FETCH_INTERVAL
.