Perform sidekiq job synchronously

Sergey Alekseev picture Sergey Alekseev · Sep 19, 2014 · Viewed 14.4k times · Source

E.g. SidekiqWorker needs to be performed immediately instead of SidekiqWorker.perform_async.

How to perform (execute, run) sidekiq job (worker) synchronously (immediately, now, without a delay)?

Answer

Sergey Alekseev picture Sergey Alekseev · Sep 19, 2014
SidekiqWorker.new.perform

Voila!