-
Notifications
You must be signed in to change notification settings - Fork 14
Debugging Strategies
Nicu Listana edited this page Feb 19, 2020
·
1 revision
Most tasks that require lot of work get offloaded into its own worker which gets queued via sidekiq. Since these tasks run in a separate process, it is difficult to debug when the breakpoint exists in the worker and not the server.
To have your task run in the same process as your server, need to change how your worker invokes the perform method from:
UpdateTemplateInstancesWorker.perform_async(id, updated_card_ids, template_update_action)to
UpdateTemplateInstancesWorker.new.perform(id, updated_card_ids, template_update_action)