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

feat: add rake task to clear actioncable jobs #9307

Merged
merged 2 commits into from Apr 30, 2024

Conversation

vishnu-narayanan
Copy link
Member

Pull Request Template

Description

  • Add a rake task to clear ActionCableBroadcastJobs from the sidekiq queue

Fixes https://linear.app/chatwoot/issue/CW-3230/add-a-rake-task-to-clear-actioncablejob-when-there-is-a-backlog-in-the

How to run?

bundle exec rake sidekiq:clear_action_cable_broadcast_jobs

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Tested locally

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

linear bot commented Apr 26, 2024

@vishnu-narayanan vishnu-narayanan temporarily deployed to chatwoot-pr-9307 April 26, 2024 12:18 Inactive
Copy link
Member

@scmmishra scmmishra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, only thing I could think of improving is using queue.each_slice instead of each as it is. For an extremely large queue this can be more memory efficient.

But this is a nitpick, we can make the change if this ever becomes a bottleneck.

@pranavrajs pranavrajs merged commit 9057c86 into develop Apr 30, 2024
16 checks passed
@pranavrajs pranavrajs deleted the feat/rake-clear-actioncable-job branch April 30, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants