Actions
tickets #166121
closedError performing PastesCleanupJob
Start date:
2024-09-01
Due date:
% Done:
0%
Estimated time:
Description
This message along with its backtraces seems to be filling up the file:
paste ():~ # grep -c 'Error performing PastesCleanupJob' /srv/www/paste-o-o/log/production.log
72932
paste ():~ # du -hs /srv/www/paste-o-o/log/production.log
2.1G /srv/www/paste-o-o/log/production.log
Updated by crameleon 4 months ago
Thanks for the pointer!
I try enclosing the destroy call in app/jobs/pastes_cleanup_job.rb with if paste
or if paste.present?
, but both seem to be true even if the paste does not exist. I also tried paste.destroy unless paste.nil?
after inspecting the console for a paste which does not exist
irb(main):047> Paste.where(title: 'test')[0].nil?
Paste Load (0.6ms) SELECT "pastes".* FROM "pastes" WHERE "pastes"."title" = $1 [["title", "test"]]
=> true
with no luck. The destroy
is still always executed.
How to check if it exists inside the job?
Actions