push-core
push-core copied to clipboard
Is there any way to run as a rake task without daemonizing?
This may be an edge case but running this on heroku costs $40/month and I really don't need instantaneous delivery from my staging environment. I'd like to run it as a scheduled task instead. It'd just check for any unsent messages and send them then exit. Is that possible?
+1
on heroku it seems tricky without the extra worker... maybe try a scheduler that runs something like bundle exec push staging -f
(or whatever env)... i'm going to try this soon.
Yes, this would be a nice feature. Right now it is not possible.
Can you please try this feature branch?
gem 'push-core', github: 'tompesman/push-core', branch: 'feature/single_run'
gem 'push-apns', github: 'tompesman/push-apns', branch: 'feature/single_run'
gem 'push-c2dm', github: 'tompesman/push-c2dm', branch: 'feature/single_run'
gem 'push-gcm', github: 'tompesman/push-gcm', branch: 'feature/single_run'
Documentation is right here: https://github.com/tompesman/push-core/tree/feature/single_run#embedding-and-single-run
Thanks!