Run jobs in named queues

This commit is contained in:
Paul Chavard 2020-09-22 17:14:31 +02:00
parent e0e635d65b
commit dea78c49f6
3 changed files with 6 additions and 0 deletions

View file

@ -1,4 +1,6 @@
class ApiEntreprise::Job < ApplicationJob
queue_as :api_entreprise
DEFAULT_MAX_ATTEMPTS_API_ENTREPRISE_JOBS = 5
rescue_from(ApiEntreprise::API::ResourceNotFound) do |exception|

View file

@ -1,4 +1,6 @@
class ExportJob < ApplicationJob
queue_as :exports
def perform(export)
export.compute
end

View file

@ -1,4 +1,6 @@
class WebHookJob < ApplicationJob
queue_as :webhooks_v1
TIMEOUT = 10
def perform(procedure, dossier)