8000 Adds rake task variant for eliminating entire applications by aalong-tr · Pull Request #1 · taskrabbit/queue-bus · GitHub 8000
[go: up one dir, main page]

Skip to content

Conversation

@aalong-tr
Copy link

The unsubscribe rake task, when passed two arguments, does not appear to actually delete any subscriptions. The exact reason for this is not obvious, but this is far from the only problem with the task:

  • the behavior when an app is provided but a queue name is omitted is surprising and potentially destructive
  • an application that uses multiple queues would require multiple runs of the task to fully decomission

Solve both of these problems with a new code path that unsubscribes a single application in its entirety. This code path already existed, but was unreachable as a safeguard against shared applications conflicting across services.

The unsubscribe rake task, when passed two arguments, does not appear to
actually delete any subscriptions. The exact reason for this is not
obvious, but this is far from the only problem with the task:
- the behavior when an app is provided but a queue name is omitted is
  surprising and potentially destructive
- an application that uses multiple queues would require multiple runs
  of the task to fully decomission

Solve both of these problems with a new code path that unsubscribes a
single application in its entirety. This code path already existed, but
was unreachable as a safeguard against shared applications conflicting
across services.
@aalong-tr aalong-tr requested a review from a team July 24, 2024 22:19
Copy link
@tomaszwro tomaszwro left a comment

Choose a reason for hiding this comment

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

LGTM

elsif app_key
manager.unsubscribe_app!(app_key)
else
manager = ::QueueBus::TaskManager.new(true)

Choose a reason for hiding this comment

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

👍

Copy link
@mattcosh mattcosh left a comment

Choose a reason for hiding this comment

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

This is clean! I like it

@aalong-tr aalong-tr merged commit 8123e42 into master Jul 26, 2024
stadori added a commit that referenced this pull request Jun 16, 2025
* Adds rake task variant for eliminating entire applications (#1)

* Adds rake task variant for eliminating entire applications

The unsubscribe rake task, when passed two arguments, does not appear to
actually delete any subscriptions. The exact reason for this is not
obvious, but this is far from the only problem with the task:
- the behavior when an app is provided but a queue name is omitted is
  surprising and potentially destructive
- an application that uses multiple queues would require multiple runs
  of the task to fully decomission

Solve both of these problems with a new code path that unsubscribes a
single application in its entirety. This code path already existed, but
was unreachable as a safeguard against shared applications conflicting
across services.

* Bumps version to 0.13.3

* sadd deprecation fix for redis 4-8-1

* version update

* changelog

---------

Co-authored-by: Drew Long <48696687+aalong-tr@users.noreply.github.com>
Co-authored-by: Shyamsunder Tadori <shyamsundertadori@Shyamsunders-MacBook-Pro-2.local>
stadori added a commit that referenced this pull request Jun 23, 2025
* Adds rake task variant for eliminating entire applications (#1)

* Adds rake task variant for eliminating entire applications

The unsubscribe rake task, when passed two arguments, does not appear to
actually delete any subscriptions. The exact reason for this is not
obvious, but this is far from the only problem with the task:
- the behavior when an app is provided but a queue name is omitted is
  surprising and potentially destructive
- an application that uses multiple queues would require multiple runs
  of the task to fully decomission

Solve both of these problems with a new code path that unsubscribes a
single application in its entirety. This code path already existed, but
was unreachable as a safeguard against shared applications conflicting
across services.

* Bumps version to 0.13.3

* pipelined deprecation fix

* version update

---------

Co-authored-by: Drew Long <48696687+aalong-tr@users.noreply.github.com>
Co-authored-by: Shyamsunder Tadori <shyamsundertadori@Shyamsunders-MacBook-Pro-2.local>
aalong-tr added a commit that referenced this pull request Jun 23, 2025
* Adds rake task variant for eliminating entire applications (#1)

* Adds rake task variant for eliminating entire applications

The unsubscribe rake task, when passed two arguments, does not appear to
actually delete any subscriptions. The exact reason for this is not
obvious, but this is far from the only problem with the task:
- the behavior when an app is provided but a queue name is omitted is
  surprising and potentially destructive
- an application that uses multiple queues would require multiple runs
  of the task to fully decomission

Solve both of these problems with a new code path that unsubscribes a
single application in its entirety. This code path already existed, but
was unreachable as a safeguard against shared applications conflicting
across services.

* Bumps version to 0.13.3

* setnx deprecation fix

* version update

---------

Co-authored-by: Drew Long <48696687+aalong-tr@users.noreply.github.com>
Co-authored-by: Shyamsunder Tadori <shyamsundertadori@Shyamsunders-MacBook-Pro-2.local>
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.

4 participants

0