2

Before I use sidekiq but now I decided to move to que and store everything in Postgresql. Because I don't need redis high-perfomance features I wanted to decrease dependency my application from external components. I add gem 'que', installed it and wrote in application.rb:

config.active_job.queue_adapter = :que

All jobs I inhereted from ActiveJob::Base

But I doesn't understand how to run background task in separate thread like I do it with sidekiq (I run by rake command rake sidekiq:start)

bbozo
  • 7,075
  • 3
  • 30
  • 56
mystdeim
  • 4,802
  • 11
  • 49
  • 77

2 Answers2

0

There is an executable que available. So, you just need to run que. To learn more about options run que -h.

Ashish Bista
  • 4,533
  • 1
  • 18
  • 25
0

You need to set Que.mode = :async to enable background workers.

You'll want to place that in an initializer file.

josh
  • 332
  • 1
  • 7