Skip to content

Commit e1ec768

Browse files
committed
Start setting up the task for the activity handler
1 parent a92944f commit e1ec768

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/sentry/workflow_engine/tasks.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from sentry.silo.base import SiloMode
33
from sentry.tasks.base import instrumented_task
44
from sentry.taskworker import config, namespaces, retry
5+
from sentry.utils import metrics
56

67

78
@instrumented_task(
@@ -31,7 +32,9 @@ def process_workflow_task(activity_id: int) -> None:
3132
The task will get the Activity from the database, create a WorkflowEventData object,
3233
and then process the data in `process_workflows`.
3334
"""
34-
# TODO implement this in a follow-up PR. This update will require a lot of updates...
35+
# TODO - @saponifi3d - implement this in a follow-up PR. This update will require WorkflowEventData
36+
# to allow for an activity in the `event` attribute. That refactor is a bit noisy
37+
# and will be done in a subsequent pr.
3538
pass
3639

3740

@@ -43,6 +46,8 @@ def workflow_status_update_handler(activity: Activity) -> None:
4346
Since this handler is called in process for the activity, we want
4447
to queue a task to process workflows asynchronously.
4548
"""
46-
# TODO implement this in a follow-up PR.
49+
# TODO - implement in follow-up PR for now, just track a metric that we are seeing the activities.
50+
metrics.incr(
51+
"workflow_engine.process_workflow.activity_update", tags={"activity_type": activity.type}
52+
)
4753
# process_workflow_task.delay(activity.id)
48-
pass

0 commit comments

Comments
 (0)