Run jobs in named queues
This commit is contained in:
parent
e0e635d65b
commit
dea78c49f6
3 changed files with 6 additions and 0 deletions
|
@ -1,4 +1,6 @@
|
||||||
class ApiEntreprise::Job < ApplicationJob
|
class ApiEntreprise::Job < ApplicationJob
|
||||||
|
queue_as :api_entreprise
|
||||||
|
|
||||||
DEFAULT_MAX_ATTEMPTS_API_ENTREPRISE_JOBS = 5
|
DEFAULT_MAX_ATTEMPTS_API_ENTREPRISE_JOBS = 5
|
||||||
|
|
||||||
rescue_from(ApiEntreprise::API::ResourceNotFound) do |exception|
|
rescue_from(ApiEntreprise::API::ResourceNotFound) do |exception|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
class ExportJob < ApplicationJob
|
class ExportJob < ApplicationJob
|
||||||
|
queue_as :exports
|
||||||
|
|
||||||
def perform(export)
|
def perform(export)
|
||||||
export.compute
|
export.compute
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
class WebHookJob < ApplicationJob
|
class WebHookJob < ApplicationJob
|
||||||
|
queue_as :webhooks_v1
|
||||||
|
|
||||||
TIMEOUT = 10
|
TIMEOUT = 10
|
||||||
|
|
||||||
def perform(procedure, dossier)
|
def perform(procedure, dossier)
|
||||||
|
|
Loading…
Reference in a new issue