99designs / 99designs/cmdstalk
Job priority not adhered to when consuming multiple tubes
- Vorherrschende Sprache
- Go
- Sterne
- 76
- Forks
- 14
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
When I execute `cmdstalk -cmd my-command -tubes pages,listing`, cmdstalk [starts two "reserve loops"](https://github.com/99designs/cmdstalk/blob/fbd704da919d283643e673bd02efcf0221224b92/broker/broker_dispatcher.go#L48). There are two problems with this:
* Suddenly the concurrency to execute jobs becomes _two_. Instead of one. This can strain downstream resources if you are not prepared.
* Due the above, jobs with different priorities are not taken into account.
beanstalkd supports having a single connection to consume multiple tubes. That's the proposed fix here.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
The issue is in broker/broker_dispatcher.go where two reserve loops are started for multiple tubes. Examine how beanstalkd handles a single connection consuming multiple tubes. Look at the existing reserve loop logic and modify it to use a single connection while respecting job priorities. Test by running cmdstalk with the -tubes flag and verifying job order and concurrency.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- go
- Bereich
- backend, cli
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100