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:
abelanger5
2024-03-11 21:45:18 -07:00
committed by GitHub
parent a982ff26dd
commit c66f97c856
67 changed files with 2865 additions and 2024 deletions

View File

@@ -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(

View File

@@ -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()