push-core icon indicating copy to clipboard operation
push-core copied to clipboard

Is there any way to run as a rake task without daemonizing?

Open danhixon opened this issue 11 years ago • 4 comments

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?

danhixon avatar Aug 21 '13 16:08 danhixon

+1

courtsimas avatar Aug 21 '13 17:08 courtsimas

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.

courtsimas avatar Aug 22 '13 21:08 courtsimas

Yes, this would be a nice feature. Right now it is not possible.

tompesman avatar Aug 29 '13 07:08 tompesman

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!

tompesman avatar Oct 02 '13 19:10 tompesman