ruby - Rails ActiveJob for infinite loop -


the application developing needs have infinite loop handle business logic separate user input (they view it). since break tradition mvc, thought active job place put it.

the logic in loop poll microcontrollers on same network. have little no ability change code on these have adapt unique protocol using. when microcontrollers respond, server need calculations , store in database.

the job launched when server application is. 1 instance of should exist don't want put in models or controllers. have tried launching couple of places in config folder cause initialized constant nameerror.

what correct way launch job when server initialized? there approach take?

i webdev newb using ruby 2.2.0 , rails 4.2.0.

how using scheduled jobs? example schedule every minute job scheduled run poll whatever need polling for?

have @ gem:

https://github.com/javan/whenever


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -