Closed WebApelsin closed 7 years ago
Thank you @WebApelsin for your PR and the cleaner implementation of the subscription, but who's going to dispose the RedisSubscription ?
It is tied to the RedisStorage
instance, so it will live as long as the storage will be alive. In its turn the JobStorage
is a singletone and it will be released on the app close.
There is also another option. I could implement an IServerComponent
(like FetchedJobsWatcher
) who will dispose the subscription on the CancellationToken
request. What do you think?
@marcoCasamento I've updated the PR, so the subscription will be explicitly disposed on the server shutdown.
Fixes issue #31