Clearing delayed job failures in dashboard

1,924 views
Skip to first unread message

Steven L. Seed

unread,
Oct 28, 2011, 2:32:26 PM10/28/11
to Puppet Users
I have a ton of delayed job failures in my dashboard under background tasks. They are mostly failed imports of report yaml files that were deleted. There are over 40000 of them so I can't use the "Mark all as read" button because it causes dashboard to hang forever. Anyone know how I can clear these from the command line?

Evgeny

unread,
Oct 31, 2011, 3:26:39 AM10/31/11
to Puppet Users
this will clean all reports, I don't know how to clean only delayed
job failures but it may help

rake RAILS_ENV=production reports:prune upto=0 unit=day

Steven L. Seed

unread,
Nov 1, 2011, 12:48:37 PM11/1/11
to puppet...@googlegroups.com
I don't think this will help. I do report cleanup daily to keep only the
last 14 days and it hasn't touched the number of delayed job failures
reported.

Nigel Kersten

unread,
Nov 1, 2011, 2:58:54 PM11/1/11
to puppet...@googlegroups.com
On Fri, Oct 28, 2011 at 11:32 AM, Steven L. Seed <slsee...@gmail.com> wrote:
I have a ton of delayed job failures in my dashboard under background tasks. They are mostly failed imports of report yaml files that were deleted. There are over 40000 of them so I can't use the "Mark all as read" button because it causes dashboard to hang forever. Anyone know how I can clear these from the command line?


'rake -T' is very useful for looking for rake tasks.

# rake -T jobs
rake jobs:clear               # Clear the delayed_job queue.
rake jobs:work                # Start a delayed_job worker. 

The first one looks like the one you want.

Steven L. Seed

unread,
Nov 1, 2011, 5:27:08 PM11/1/11
to puppet...@googlegroups.com, Nigel Kersten
Thanks Nigel, but I have already tried that. I originally used the 'rake jobs:clear' command to clear out all pending delayed jobs that had built up over time. That's when they appeared in the "delayed_jobs_failures" list ie. "Background Task Failures". My problem isn't that there are delayed jobs pending, just that the log of failed jobs is so large that I can't clear them properly. 


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Nigel Kersten

unread,
Nov 1, 2011, 6:47:00 PM11/1/11
to Steven L. Seed, puppet...@googlegroups.com
On Tue, Nov 1, 2011 at 2:27 PM, Steven L. Seed <slsee...@gmail.com> wrote:
Thanks Nigel, but I have already tried that. I originally used the 'rake jobs:clear' command to clear out all pending delayed jobs that had built up over time. That's when they appeared in the "delayed_jobs_failures" list ie. "Background Task Failures". My problem isn't that there are delayed jobs pending, just that the log of failed jobs is so large that I can't clear them properly. 

That's totally a bug then. Can you report it here please?


Thanks Steven.

I'll poke around and get someone to update your ticket with a workaround.



 



On 11/01/2011 11:58 AM, Nigel Kersten wrote:


On Fri, Oct 28, 2011 at 11:32 AM, Steven L. Seed <slsee...@gmail.com> wrote:
I have a ton of delayed job failures in my dashboard under background tasks. They are mostly failed imports of report yaml files that were deleted. There are over 40000 of them so I can't use the "Mark all as read" button because it causes dashboard to hang forever. Anyone know how I can clear these from the command line?


'rake -T' is very useful for looking for rake tasks.

# rake -T jobs
rake jobs:clear               # Clear the delayed_job queue.
rake jobs:work                # Start a delayed_job worker. 

The first one looks like the one you want.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.




--
Nigel Kersten
Product Manager, Puppet Labs


jcaahhcc.png

Evgeny

unread,
Nov 3, 2011, 8:10:01 AM11/3/11
to Puppet Users
then only it will help:

delete FROM `delayed_job_failures` WHERE 1

Luke Bigum

unread,
Nov 3, 2011, 8:19:32 AM11/3/11
to Puppet Users
FYI this is a lot faster to delete everything from a MySQL table:

TRUNCATE TABLE delayed_job_failures;

Nigel Kersten

unread,
Nov 3, 2011, 11:36:23 AM11/3/11
to puppet...@googlegroups.com
FWIW the bug was put in as:


(adding these comments to it)



--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Steven L. Seed

unread,
Nov 3, 2011, 1:43:41 PM11/3/11
to puppet...@googlegroups.com, Nigel Kersten
Thanks all. That worked.
Reply all
Reply to author
Forward
0 new messages