Closed
Description
We have a job:
class EveryMinuteJob < ApplicationJob
after_perform do
enqueue wait: 1.minute
end
def perform
# do something
end
end
That re-enqueues itself after performing. This is counted as "retry". The retry count can accumulate to a huge number in short time.
With some recent changes on GJ (which I didn't trace yet), such job with many retries kills the dashboard UI, as the retries are stored in database (some time ago they weren't).
Even the main dashboard page with jobs list, where job has only a counter of retries, it is endlessly loading, spiking in huge memory consumption.
We mitigated the problem by changing the job to:
class EveryMinuteJob < ApplicationJob
after_perform do
EveryMinuteJob.set(wait: 1.minute).perform_later
end
def perform
# do something
end
end
which is not counted as "retry" anymore.
@bensheldon Feel free to close it, as we workaround the problem, just giving you insights on some recent GJ changes.
Metadata
Assignees
Labels
No labels
Projects
Status
Done
Activity