My succeeded job queue is at almost 5 million. I set the JobExpirationTimeout to 4 days but I still have jobs from almost a year ago which are not being removed.
First of all, retention, or expiration time is setting up only for successful and deleted jobs. Other job states, including the failed state, don't have any expiration time. That is why your failed jobs will be kept infinitely before you fix/retry or delete them manually.
But if you really want to set up retention time for succeeded or deleted jobs, you can add the following job filter (they are like action filters in ASP.NET MVC):
public class ProlongExpirationTimeAttribute : JobFilterAttr…
Is there some other property I should be looking at? The Deleted queue is being cleared out properly.
What is the best way to immediately remove the succeeded jobs? Can I just delete from the job table where the statename = ‘Succeeded’?
I am running the latest version of hang fire.