# Sidekiq queue growing

**URL:** <https://meta.discourse.org/t/sidekiq-queue-growing/66558>\
**Category:** Product Support\
**Created:** [20. Juli 2017 um 21:22 UTC](https://meta.discourse.org/t/sidekiq-queue-growing/66558 "2017-07-20T21:22:14Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)\
**Post date:** [16. Mai 2018 um 12:05 UTC](https://meta.discourse.org/t/sidekiq-queue-growing/66558/4 "2018-05-16T12:05:00Z")

</div>

I have an issue with my queue too - apparently we rebaked some posts at a too high rate. Can someone help me tweak the script above to:

- Work on Jobs:ProcessPost
- Delete all jobs where post\_id is below a certain value

Edit: I think I’ve worked it out, how’s this?

```plaintext
queue = Sidekiq::Queue.new("default")
queue.each do | job |
	job.delete if (job.klass == 'Jobs::ProcessPost' && job.args[0]["post_id"] <= 123456 )
end

```

---

_[View the full topic](https://meta.discourse.org/t/sidekiq-queue-growing/66558)._
