-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
prototype(worker-tasks): Create pending task store abstraction #77658
Conversation
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 too large to review as is. I'd recommend breaking it up, and adding tests to each section as you go
This is not meant to target prod, it's for prototyping only. Apologies for the confusion! |
|
||
@dataclass | ||
class PendingTask: | ||
proto_task: PendingTaskProto |
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.
👍 Decorating with a 'domain object' is a good path to take. Copying all the values out of the protobuf will be expensive in aggregate.
We might want to add methods/properties to this object that proxy to the proto_task
and have the proto_task
be a private property.
from dataclasses import dataclass | ||
from enum import Enum | ||
|
||
from sentry_protos.hackweek_team_no_celery_pls.v1alpha.pending_task_pb2 import ( |
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.
We'll have to come up with a better name for this 😄
@@ -224,3 +120,4 @@ def do_upkeep( | |||
|
|||
def shutdown(self): | |||
self.pool.close() | |||
self.pool.close() |
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.
Why 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.
This is a mistake, it's fixed now
No description provided.