0

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

Derk153
  • 664
  • 2
  • 9
  • 25
  • 3
    It's not obvious what you want, what you have and how you expect to get there with what you've done. Please **give example input and output** needed and *explain* what you've been trying to do to achieve this. – Veedrac Sep 29 '14 at 12:45
  • @Veedrac In this case, the input/output data does not matter. The goal is to preserving and execute Python scripts in Rails environment using workers. – Derk153 Sep 29 '14 at 12:54
  • Stack Overflow is geared towards specific, directly answerable questions with little scope for opinions and hints. If you really don't have any kind of example, I imagine there are more appropriate places to ask. – Veedrac Sep 29 '14 at 12:56
  • @Veedrac Thanks for answer. I'll take a look "more appropriate places to ask". – Derk153 Sep 29 '14 at 13:00
  • I don't understand why the OP is so reluctant to get specific. – Max Williams Sep 29 '14 at 13:23

1 Answers1

2

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
Community
  • 1
  • 1
user2678194
  • 36
  • 1
  • 1
  • 3