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

Feature/loop for crashed tasks #266

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rakovskij-stanislav
Copy link
Contributor

@rakovskij-stanislav rakovskij-stanislav commented Jan 7, 2025

Karton already supports debug mode, but sometimes you need to works with already "unwealthy" tasks that crashed.

Restarting them is not an option - you cannot predict which consumer will get this task, while you need to feed this task to exact consumer you run under debugger / with extra prints / etc. The goal is to debug crashed task without interrupting the processing.

This PR introduces new method, Consumer.loop_crached_tasks that gradually makes debugging process more easy by working only with crashed tasks. It has several restrictions:

  • It ignores timeouts (for benefit of debugging).
  • It works with karton.tasks instead of karton.queue list in redis.
  • It does not register new binds, shut down already running instances.
  • It does not increment CRASHED metrics on further crashes.
  • It does not immediately change this task status to STARTED.

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