From c22b1509863a655dfd7b88f7594b4a332614e277 Mon Sep 17 00:00:00 2001 From: Evan Hicks Date: Wed, 20 Nov 2024 11:15:13 -0500 Subject: [PATCH] ref(taskbroker) Add at_most_once flag to task activations Some tasks can be marked as being only executed at most once. Add a flag to denote that status. Tasks with this status are guaranteed to execute 0 or 1 times. The worker uses this flag to determine how it should handle the task. --- proto/sentry_protos/sentry/v1/taskworker.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proto/sentry_protos/sentry/v1/taskworker.proto b/proto/sentry_protos/sentry/v1/taskworker.proto index 8622984..7793d70 100644 --- a/proto/sentry_protos/sentry/v1/taskworker.proto +++ b/proto/sentry_protos/sentry/v1/taskworker.proto @@ -17,6 +17,9 @@ message RetryState { // After this attempt the task should be put in the dead-letter-queue. optional int32 deadletter_after_attempt = 4; + + // Whether a task should be executed at most once. + optional bool at_most_once = 5; } enum TaskActivationStatus {