pyres
pyres copied to clipboard
a couple of Ruby-compatibility fixes
Here are a couple of fixes that we've used to be able to use Ruby to queue jobs and Python to run them. It's a great combo for us because the web guys like Ruby and the scientists like Python.
First fix: Ruby uses "::" to separate modules from classes, while python uses "." so we'll sniff the queued class name for "::" and if it's there then we're probably handling a job that was queued by Ruby.
Second fix: resque-web was crashing because pyres wrote the "run_at" field in a different format than resque. This fix makes pyres use the same format as resque so now resque-web can show pyres jobs.
Thanks!
Hi, I added a second commit to this branch a few days ago. It makes pyres compatible with the resque-web UI. Previously it wrote the run_at timestamp in a format that made resque-web crash but 65c3e34 changes the format so it's similar to the Ruby resque format and now the UI works.