mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-06 00:40:10 -06:00
fix: deadlocks on workers and tickers (#241)
* chore: add sentry support to engine * fix: deadlocks on workers and tickers * refactor: reduce prisma calls in engine * trigger * fix: remove some tenant lookups * feat: dlx and renamed taskqueue -> msgqueue * refactor: get group key run logic * fix: retry counts on messages and concurrency edge cases * fix: rabbitmq integration tests * feat: add consumer timeouts --------- Co-authored-by: Luca Steeb <contact@luca-steeb.com>
This commit is contained in:
@@ -5,10 +5,10 @@ load_dotenv()
|
||||
|
||||
client = new_client()
|
||||
|
||||
for i in range(20):
|
||||
for i in range(200):
|
||||
group = "0"
|
||||
|
||||
if i > 10:
|
||||
if i % 2 == 0:
|
||||
group = "1"
|
||||
|
||||
client.event.push(
|
||||
|
||||
@@ -18,12 +18,12 @@ class ConcurrencyDemoWorkflowRR:
|
||||
@hatchet.step()
|
||||
def step1(self, context):
|
||||
print("starting step1")
|
||||
context.sleep(5)
|
||||
context.sleep(0.2)
|
||||
print("finished step1")
|
||||
pass
|
||||
|
||||
workflow = ConcurrencyDemoWorkflowRR()
|
||||
worker = hatchet.worker('concurrency-demo-worker-rr', max_runs=1)
|
||||
worker = hatchet.worker('concurrency-demo-worker-rr', max_runs=10)
|
||||
worker.register_workflow(workflow)
|
||||
|
||||
worker.start()
|
||||
Reference in New Issue
Block a user