tickets #166121
closed
Error performing PastesCleanupJob
Added by crameleon 4 months ago.
Updated 4 months ago.
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
- Category set to Paste
- Assignee set to hellcp
- Private changed from Yes to No
This is a result of removing the pastes before the time they expire (presumably because of spam). It's a matter of adding an if condition to check if the paste still exists when trying to remove it
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?
- Status changed from New to In Progress
- Assignee changed from hellcp to crameleon
- Status changed from In Progress to Resolved
Also available in: Atom
PDF