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

Dont automaticaly start consumer in memqueue #202

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

rymurr
Copy link

@rymurr rymurr commented Nov 27, 2024

We have a use case where we want to mock a redis queue in testing by using a memqueue. Our code calls https://github.com/vmihailenco/taskq/blob/v3/consumer.go#L314 which fails if the consumer is already started so we want to init our memqueue w/o starting the consumer.

We tried using https://github.com/vmihailenco/taskq/blob/v3/consumer.go#L202 immediately after we created the memqueue but this sometimes takes a very long time in our CI causing spurious flaky tests.

This change is meant to be the smallest possible change to suit our needs and not change the taskq api. Happy to re-work if you have a better suggested path to solve our use case.

@rymurr rymurr force-pushed the v3 branch 2 times, most recently from 1b7ebe0 to baf5faf Compare November 27, 2024 09:20
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.

1 participant