Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to manually clear/reset the changelog history? #568

Closed
summera opened this issue Jan 21, 2021 · 6 comments · Fixed by #569
Closed

Any way to manually clear/reset the changelog history? #568

summera opened this issue Jan 21, 2021 · 6 comments · Fixed by #569

Comments

@summera
Copy link

summera commented Jan 21, 2021

Is your feature request related to a problem? Please describe.
While initially setting this up, I had changelog enabled. I then disabled the changelog by setting max_history to nil since I didn't need it anymore, but the old entries remained.

Describe the solution you'd like
It would be nice to have a command to run in the console or a button in the UI to clear the changelog history.

@mhenrixon mhenrixon self-assigned this Jan 21, 2021
@mhenrixon
Copy link
Owner

That's a great suggestion! I'll make that happen for the next release.

@mhenrixon
Copy link
Owner

mhenrixon commented Jan 22, 2021

It will be released with the next version @summera

@mhenrixon
Copy link
Owner

https://github.com/mhenrixon/sidekiq-unique-jobs/releases/tag/v7.0.1 also makes the reaper start, I added tests for this to avoid such problems in the future.

You should have a Changelogs tab in the sidekiq web extensions now @summera

@summera
Copy link
Author

summera commented Jan 22, 2021

@mhenrixon that was fast! Thanks a lot. I see that in #570, the death_handlers part was removed from the README:

  config.death_handlers << lambda do |job, _ex|
    digest = job["lock_digest"]
    SidekiqUniqueJobs::Digests.new.delete_by_digest(digest) if digest
  end

Is that no longer necessary if you are not running the reaper? I did notice during my testing that when I raised an exception in a job, lock_digest did not seem to be available in that lambda but the lock was still cleaned up.

@mhenrixon
Copy link
Owner

@summera If you follow the instructions and run SidekiqUniqueJobs::Server.configure(config) I do that automatically for you.

Seems like a waste to leave it up to the user when it can be avoided.

@summera
Copy link
Author

summera commented Jan 22, 2021

Seems like a waste to leave it up to the user when it can be avoided.

Agree, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants