Search code examples
pythonruby-on-railsrubyworkerironworker

Python workers in Rails


I'm building rails application, I have workers from other project, they called ironworker and written on Python. Is it possible to use this workers in Rails application? As one of solution, I'm going to use other worker - resque, but can I execute Python scripts?

Thanks for help, I have no idea from what I should start


Solution

  • As I understand from the docs of ironworker, python workers can be run from command line.

    exec 'hello_worker.py'
    

    This post explain how you can do it: Calling shell commands from Ruby.

    For example you can call python workers in your rescue worker:

    class ImageConversionJob
      def work
        system("exec 'hello_worker.py'")
      end
    end