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 about 2 months ago
- Category set to Paste
- Assignee set to hellcp
- Private changed from Yes to No
Updated by hellcp about 2 months ago
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
Updated by crameleon about 2 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?
Updated by crameleon about 2 months ago
- Status changed from New to In Progress
- Assignee changed from hellcp to crameleon
Updated by crameleon about 2 months ago
- Status changed from In Progress to Resolved
Actions