Flash. How do you put it on Rails?



  • Objective:

    1. Retracts OBD baseline data
    2. Formulates, sends a request to the API side site and processes the answer
    3. Data at DB

    It's all working on the button, but how do we make the process background, periodic and preferably asynchronous? Prospered with help whenever and sidekiqbut it didn't work. The challenge is launched once a minute, but there's nothing in the "sidekiq" logs, the task goes beyond 0 ms to look at the consoles and the results are not visible. whenever and sidekiq launched.

    schedule.rb

    every 1.minute do
      runner "UpdateWorker.perform_async"
    end
    

    update_worker.rb

        class UpdateWorker
          include Sidekiq::Worker
          include CommonMods
    
      def perform
        logger.info "Things are happening."
        logger.debug "Here's some info: #{hash.inspect}"
        myMethod
      end
      def myMethod
            ....
            ....
            ....
      end
    

    end

    If you can, please elaborate on how to do it.

    UPDATELarceny just opened up, all we had to do was make a restalt. Sidekiq After changes in the code.



  • My case is closed by @anoam. After any changes in the code, we need to make a restad. Sidekiq♪ But further conceptual answers are welcome!


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2