-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: Add taskworker usage guide content #14900
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
Conversation
Add the taskworker usage guide content from notion to our public documentation. Refs STREAM-439
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
👀 |
develop-docs/backend/application-domains/asynchronous-workers.mdx
Outdated
Show resolved
Hide resolved
|
||
## Processing Deadlines | ||
|
||
Every task has a ‘processing deadline’ which is the maximum expected runtime for a task. The default duration is **10 seconds** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This raises a question for self-hosted: How do we increase the processing deadline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Processing deadlines are defined in code. In general processing deadlines are fairly generous as we don't want tasks timing out regularly. They are mostly intended as a backstop to changes that dramatically change the runtime of a task where it would consume vastly more worker resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I think it's better if you put your answer into the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to the docs.
### Broker specific terms | ||
|
||
- `InflightActivations` When `TaskActivations` are being processed, additional metadata is stored in the `InflightActivationStore` until execution is complete. | ||
- `max_pending_count` The maximum number of tasks that can be pending in `InflightActivations` sqlite database. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only mention regarding sqlite. Is it being used for anything else other than inflight activation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the only usage of sqlite in taskbroker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, so if the sqlite is removed (by any means or reason), we just need to restart the container and everything would be fine again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll put that in the operational docs. I will do a separate pull request for those to keep this a manageable size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes thank you!
Co-authored-by: Reinaldy Rafli <[email protected]>
- `Task` A function that can be scheduled to run later. Tasks are executed by workers, and can be retried should they fail. | ||
- `TaskNamespace` A collection of related tasks that are operated together. Activations within a namespace will be ordered, but activations between namespaces have no ordering promises. | ||
- `TaskActivation` A deferred task invocation that can be serialized and executed later. Also referred to as an `activation` . | ||
- `TaskNamespace` A collection of related tasks that share default behaviour and infrastructure. Task namespaces can be isolated from each other. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in here twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. I'll remove the second copy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than Evan's notes, LGTM.
## DESCRIBE YOUR PR We should give guidance on how to operate taskbroker/workers in self-hosted environments as there will be installs that need more than a single broker/worker Refs STREAM-439 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [x] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs)
Co-authored-by: Evan Hicks <[email protected]>
DESCRIBE YOUR PR
Add the taskworker usage guide content from notion to our public documentation.
Refs STREAM-439
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: