I have an object (EventRunner) whose sole purpose is to listen on a Redis pub/sub channel and enqueue a Resque job when a certain message is received on the channel. The EventRunner is instantiated and executed as a separate process in parallel with the Hanami process.
Questions:
- Would EventRunner be considered a service object or something else?
- Where would be the best place to put the event_runner.rb class file and the executable script which instantiates it?
- I currently have the class file in PROJECT_ROOT/lib/backend/services/ (parallel with entities, etc.). The script is in PROJECT_ROOT/script/. Are these appropriate locations, or should they be placed elsewhere?