binarymatt / pyres

a resque clone in python
http://github.com/binarydud/pyres
MIT License
955 stars 130 forks source link

a couple of Ruby-compatibility fixes #146

Open caboteria opened 8 years ago

caboteria commented 8 years ago

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!

caboteria commented 7 years ago

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.