marcoCasamento / Hangfire.Redis.StackExchange

HangFire Redis storage based on original (and now unsupported) Hangfire.Redis but using lovely StackExchange.Redis client
Other
456 stars 109 forks source link

Does SucceededListSize and DeletedListSize work? #38

Closed dotnetshadow closed 7 years ago

dotnetshadow commented 7 years ago

Hi there

I recently implemented the Redis connection as:

var storage = new RedisStorage("127.0.0.1:6379,abortConnect=false", new RedisStorageOptions { Db = 1, Prefix = "hangfire:app1:", InvisibilityTimeout = TimeSpan.FromMinutes(10), SucceededListSize = 10, DeletedListSize = 10 });

But it seems that it doesn't have an effect, the list always keeps showing more than 10 items, even though my items have expired

jobs

I know that the sqlstorage has a property called JobExpirationCheckInterval which check every 30 mins, but I'm not sure if the Redis implementation has something similar or if the ExpirationManager is actually being called at all?

EDIT: I just created over 500 jobs and it looks like it's capping at 500, so I'm not sure why my settings above aren't taking effect.

marcoCasamento commented 7 years ago

You're right there's a bug and no test for it.

marcoCasamento commented 7 years ago

56 by @pieceofsummer solves this. Please have a look, I'm going to close this for now