Hi, Seeking for some strong opinions and critique about this technique: https://gist.github.com/4056879
(The only assumption it has is that every worker has access to ENV['PIDFILE'] variable in a predefined format (which is provisioned by Chef)). What it does: 1. Can control what exactly workers do from Ruby and easily re-deploy changes. 2. Can control scheduling without external processes (e.g.: [whenever, cron] --start a process, load full Rails--> enqueue the job). (a bonus - specs on how the workers are started) Note that the option with whenever works perfectly fine. The only problem is that all the background jobs are run as part of the normal DelayedJob worker. Thus need to be enqueued. So cron loads full Rails app to just insert a single record (enqueue the job) which is horribly inefficient. My thinking: if we already have background workers (that are monitored with monit) why do we need another piece of infrastructure to schedule the jobs? So I decided to try how the in-process scheduling would work which seems to be extremely lightweight and fast. Ay constructive criticism on this? Potential gotchas, issues? Cheers, Dmytrii. -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To view this discussion on the web visit https://groups.google.com/d/msg/rails-oceania/-/m5IgetcwzE8J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en.
