dapr-dev 1.17.0.dev90__tar.gz → 1.17.0.dev94__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dapr_dev-1.17.0.dev90/dapr_dev.egg-info → dapr_dev-1.17.0.dev94}/PKG-INFO +1 -1
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/__init__.py +2 -0
- dapr_dev-1.17.0.dev94/dapr/actor/runtime/_failure_policy.py +19 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/_reminder_data.py +21 -7
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/actor.py +11 -4
- dapr_dev-1.17.0.dev94/dapr/actor/runtime/failure_policy.py +105 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/mock_actor.py +11 -4
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94/dapr_dev.egg-info}/PKG-INFO +1 -1
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr_dev.egg-info/SOURCES.txt +2 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/LICENSE +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/README.md +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/__init__.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/actor_interface.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/client/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/client/proxy.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/id.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/_call_type.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/_method_context.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/_state_provider.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/_timer_data.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/_type_information.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/_type_utils.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/config.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/context.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/manager.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/method_dispatcher.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/mock_state_manager.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/reentrancy_context.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/remindable.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/runtime.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/state_change.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/actor/runtime/state_manager.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/aio/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/aio/clients/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/aio/clients/grpc/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/aio/clients/grpc/_request.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/aio/clients/grpc/_response.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/aio/clients/grpc/client.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/aio/clients/grpc/interceptors.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/aio/clients/grpc/subscription.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/aio/clients/health.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/_constants.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/base.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/exceptions.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/_conversation_helpers.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/_crypto.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/_helpers.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/_jobs.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/_request.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/_response.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/_state.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/client.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/conversation.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/interceptors.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/grpc/subscription.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/health.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/http/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/http/client.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/http/conf.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/http/dapr_actor_http_client.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/http/dapr_invocation_http_client.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/http/helpers.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/retry.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/common/pubsub/subscription.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/conf/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/conf/global_settings.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/conf/helpers.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/common/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/common/v1/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/common/v1/common_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/common/v1/common_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/common/v1/common_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/actors_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/actors_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/actors_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/ai_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/ai_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/ai_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/appcallback_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/appcallback_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/appcallback_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/binding_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/binding_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/binding_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/configuration_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/configuration_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/configuration_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/crypto_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/crypto_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/crypto_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/dapr_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/dapr_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/dapr_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/invoke_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/invoke_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/invoke_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/jobs_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/jobs_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/jobs_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/lock_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/lock_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/lock_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/metadata_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/metadata_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/metadata_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/pubsub_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/pubsub_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/pubsub_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/secret_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/secret_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/secret_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/state_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/state_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/state_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/workflow_pb2.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/workflow_pb2.pyi +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/workflow_pb2_grpc.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/py.typed +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/serializers/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/serializers/base.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/serializers/json.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/serializers/util.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/version/__init__.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/version/version.py +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr_dev.egg-info/dependency_links.txt +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr_dev.egg-info/not-zip-safe +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr_dev.egg-info/requires.txt +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr_dev.egg-info/top_level.txt +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/pyproject.toml +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/setup.cfg +0 -0
- {dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/setup.py +0 -0
|
@@ -17,6 +17,7 @@ from dapr.actor.actor_interface import ActorInterface, actormethod
|
|
|
17
17
|
from dapr.actor.client.proxy import ActorProxy, ActorProxyFactory
|
|
18
18
|
from dapr.actor.id import ActorId
|
|
19
19
|
from dapr.actor.runtime.actor import Actor
|
|
20
|
+
from dapr.actor.runtime.failure_policy import ActorReminderFailurePolicy
|
|
20
21
|
from dapr.actor.runtime.remindable import Remindable
|
|
21
22
|
from dapr.actor.runtime.runtime import ActorRuntime
|
|
22
23
|
|
|
@@ -26,6 +27,7 @@ __all__ = [
|
|
|
26
27
|
'ActorProxyFactory',
|
|
27
28
|
'ActorId',
|
|
28
29
|
'Actor',
|
|
30
|
+
'ActorReminderFailurePolicy',
|
|
29
31
|
'ActorRuntime',
|
|
30
32
|
'Remindable',
|
|
31
33
|
'actormethod',
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Copyright 2026 The Dapr Authors
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
# Backward-compatible shim — import from the public module instead.
|
|
17
|
+
from dapr.actor.runtime.failure_policy import ActorReminderFailurePolicy
|
|
18
|
+
|
|
19
|
+
__all__ = ['ActorReminderFailurePolicy']
|
|
@@ -17,6 +17,8 @@ import base64
|
|
|
17
17
|
from datetime import timedelta
|
|
18
18
|
from typing import Any, Dict, Optional
|
|
19
19
|
|
|
20
|
+
from dapr.actor.runtime.failure_policy import ActorReminderFailurePolicy
|
|
21
|
+
|
|
20
22
|
|
|
21
23
|
class ActorReminderData:
|
|
22
24
|
"""The class that holds actor reminder data.
|
|
@@ -28,32 +30,37 @@ class ActorReminderData:
|
|
|
28
30
|
for the first time.
|
|
29
31
|
period: the time interval between reminder invocations after
|
|
30
32
|
the first invocation.
|
|
33
|
+
failure_policy: the optional policy for handling reminder failures.
|
|
31
34
|
"""
|
|
32
35
|
|
|
33
36
|
def __init__(
|
|
34
37
|
self,
|
|
35
38
|
reminder_name: str,
|
|
36
|
-
state:
|
|
39
|
+
state: bytes,
|
|
37
40
|
due_time: timedelta,
|
|
38
41
|
period: Optional[timedelta] = None,
|
|
39
42
|
ttl: Optional[timedelta] = None,
|
|
43
|
+
failure_policy: Optional[ActorReminderFailurePolicy] = None,
|
|
40
44
|
):
|
|
41
45
|
"""Creates new :class:`ActorReminderData` instance.
|
|
42
46
|
|
|
43
47
|
Args:
|
|
44
48
|
reminder_name (str): the name of Actor reminder.
|
|
45
|
-
state (bytes
|
|
49
|
+
state (bytes): the state data passed to
|
|
46
50
|
receive_reminder callback.
|
|
47
51
|
due_time (datetime.timedelta): the amount of time to delay before
|
|
48
52
|
invoking the reminder for the first time.
|
|
49
53
|
period (datetime.timedelta): the time interval between reminder
|
|
50
54
|
invocations after the first invocation.
|
|
51
55
|
ttl (Optional[datetime.timedelta]): the time interval before the reminder stops firing.
|
|
56
|
+
failure_policy (Optional[ActorReminderFailurePolicy]): the policy for handling
|
|
57
|
+
reminder failures. If not set, the Dapr runtime default applies (3 retries).
|
|
52
58
|
"""
|
|
53
59
|
self._reminder_name = reminder_name
|
|
54
60
|
self._due_time = due_time
|
|
55
61
|
self._period = period
|
|
56
62
|
self._ttl = ttl
|
|
63
|
+
self._failure_policy = failure_policy
|
|
57
64
|
|
|
58
65
|
if not isinstance(state, bytes):
|
|
59
66
|
raise ValueError(f'only bytes are allowed for state: {type(state)}')
|
|
@@ -85,11 +92,14 @@ class ActorReminderData:
|
|
|
85
92
|
"""Gets ttl of Actor Reminder."""
|
|
86
93
|
return self._ttl
|
|
87
94
|
|
|
95
|
+
@property
|
|
96
|
+
def failure_policy(self) -> Optional[ActorReminderFailurePolicy]:
|
|
97
|
+
"""Gets the failure policy of Actor Reminder."""
|
|
98
|
+
return self._failure_policy
|
|
99
|
+
|
|
88
100
|
def as_dict(self) -> Dict[str, Any]:
|
|
89
101
|
"""Gets :class:`ActorReminderData` as a dict object."""
|
|
90
|
-
encoded_state =
|
|
91
|
-
if self._state is not None:
|
|
92
|
-
encoded_state = base64.b64encode(self._state)
|
|
102
|
+
encoded_state = base64.b64encode(self._state)
|
|
93
103
|
reminderDict: Dict[str, Any] = {
|
|
94
104
|
'reminderName': self._reminder_name,
|
|
95
105
|
'dueTime': self._due_time,
|
|
@@ -100,14 +110,18 @@ class ActorReminderData:
|
|
|
100
110
|
if self._ttl is not None:
|
|
101
111
|
reminderDict.update({'ttl': self._ttl})
|
|
102
112
|
|
|
113
|
+
if self._failure_policy is not None:
|
|
114
|
+
reminderDict.update({'failurePolicy': self._failure_policy.as_dict()})
|
|
115
|
+
|
|
103
116
|
return reminderDict
|
|
104
117
|
|
|
105
118
|
@classmethod
|
|
106
119
|
def from_dict(cls, reminder_name: str, obj: Dict[str, Any]) -> 'ActorReminderData':
|
|
107
120
|
"""Creates :class:`ActorReminderData` object from dict object."""
|
|
108
121
|
b64encoded_state = obj.get('data')
|
|
109
|
-
|
|
110
|
-
|
|
122
|
+
if b64encoded_state is None or len(b64encoded_state) == 0:
|
|
123
|
+
state_bytes = b''
|
|
124
|
+
else:
|
|
111
125
|
state_bytes = base64.b64decode(b64encoded_state)
|
|
112
126
|
if 'ttl' in obj:
|
|
113
127
|
return ActorReminderData(
|
|
@@ -22,6 +22,7 @@ from dapr.actor.runtime._method_context import ActorMethodContext
|
|
|
22
22
|
from dapr.actor.runtime._reminder_data import ActorReminderData
|
|
23
23
|
from dapr.actor.runtime._timer_data import TIMER_CALLBACK, ActorTimerData
|
|
24
24
|
from dapr.actor.runtime.context import ActorRuntimeContext
|
|
25
|
+
from dapr.actor.runtime.failure_policy import ActorReminderFailurePolicy
|
|
25
26
|
from dapr.actor.runtime.state_manager import ActorStateManager
|
|
26
27
|
|
|
27
28
|
|
|
@@ -113,6 +114,7 @@ class Actor:
|
|
|
113
114
|
due_time: timedelta,
|
|
114
115
|
period: Optional[timedelta] = None,
|
|
115
116
|
ttl: Optional[timedelta] = None,
|
|
117
|
+
failure_policy: Optional[ActorReminderFailurePolicy] = None,
|
|
116
118
|
) -> None:
|
|
117
119
|
"""Registers actor reminder.
|
|
118
120
|
|
|
@@ -129,11 +131,16 @@ class Actor:
|
|
|
129
131
|
state (bytes): the user state passed to the reminder invocation.
|
|
130
132
|
due_time (datetime.timedelta): the amount of time to delay before invoking the reminder
|
|
131
133
|
for the first time.
|
|
132
|
-
period (datetime.timedelta): the time interval between reminder
|
|
133
|
-
the first invocation.
|
|
134
|
-
|
|
134
|
+
period (Optional[datetime.timedelta]): the optional time interval between reminder
|
|
135
|
+
invocations after the first invocation. If not set, the Dapr runtime behavior
|
|
136
|
+
for one-off or non-periodic reminders applies.
|
|
137
|
+
ttl (Optional[datetime.timedelta]): the optional time interval before the reminder
|
|
138
|
+
stops firing. If not set, the Dapr runtime default behavior applies.
|
|
139
|
+
failure_policy (Optional[ActorReminderFailurePolicy]): the optional policy for
|
|
140
|
+
handling reminder failures. If not set, the Dapr runtime default applies
|
|
141
|
+
(3 retries per tick).
|
|
135
142
|
"""
|
|
136
|
-
reminder = ActorReminderData(name, state, due_time, period, ttl)
|
|
143
|
+
reminder = ActorReminderData(name, state, due_time, period, ttl, failure_policy)
|
|
137
144
|
req_body = self._runtime_ctx.message_serializer.serialize(reminder.as_dict())
|
|
138
145
|
await self._runtime_ctx.dapr_client.register_reminder(
|
|
139
146
|
self._runtime_ctx.actor_type_info.type_name, self.id.id, name, req_body
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Copyright 2026 The Dapr Authors
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from datetime import timedelta
|
|
17
|
+
from typing import Any, Dict, Optional
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ActorReminderFailurePolicy:
|
|
21
|
+
"""Defines what happens when an actor reminder fails to trigger.
|
|
22
|
+
|
|
23
|
+
Use :meth:`drop_policy` to discard failed ticks without retrying, or
|
|
24
|
+
:meth:`constant_policy` to retry at a fixed interval.
|
|
25
|
+
|
|
26
|
+
Attributes:
|
|
27
|
+
drop: whether this is a drop (no-retry) policy.
|
|
28
|
+
interval: the retry interval for a constant policy.
|
|
29
|
+
max_retries: the maximum number of retries for a constant policy.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def __init__(
|
|
33
|
+
self,
|
|
34
|
+
*,
|
|
35
|
+
drop: bool = False,
|
|
36
|
+
interval: Optional[timedelta] = None,
|
|
37
|
+
max_retries: Optional[int] = None,
|
|
38
|
+
):
|
|
39
|
+
"""Creates a new :class:`ActorReminderFailurePolicy` instance.
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
drop (bool): if True, creates a drop policy that discards the reminder
|
|
43
|
+
tick on failure without retrying. Cannot be combined with interval
|
|
44
|
+
or max_retries.
|
|
45
|
+
interval (datetime.timedelta): the retry interval for a constant policy.
|
|
46
|
+
max_retries (int): the maximum number of retries for a constant policy.
|
|
47
|
+
If not set, retries indefinitely.
|
|
48
|
+
|
|
49
|
+
Raises:
|
|
50
|
+
ValueError: if drop is combined with interval or max_retries, or if
|
|
51
|
+
neither drop=True nor at least one of interval/max_retries is provided.
|
|
52
|
+
"""
|
|
53
|
+
if drop and (interval is not None or max_retries is not None):
|
|
54
|
+
raise ValueError('drop policy cannot be combined with interval or max_retries')
|
|
55
|
+
if not drop and interval is None and max_retries is None:
|
|
56
|
+
raise ValueError('specify either drop=True or at least one of interval or max_retries')
|
|
57
|
+
self._drop = drop
|
|
58
|
+
self._interval = interval
|
|
59
|
+
self._max_retries = max_retries
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def drop_policy(cls) -> 'ActorReminderFailurePolicy':
|
|
63
|
+
"""Returns a policy that drops the reminder tick on failure (no retry)."""
|
|
64
|
+
return cls(drop=True)
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def constant_policy(
|
|
68
|
+
cls,
|
|
69
|
+
interval: Optional[timedelta] = None,
|
|
70
|
+
max_retries: Optional[int] = None,
|
|
71
|
+
) -> 'ActorReminderFailurePolicy':
|
|
72
|
+
"""Returns a policy that retries at a constant interval on failure.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
interval (datetime.timedelta): the time between retry attempts.
|
|
76
|
+
max_retries (int): the maximum number of retry attempts. If not set,
|
|
77
|
+
retries indefinitely.
|
|
78
|
+
"""
|
|
79
|
+
return cls(interval=interval, max_retries=max_retries)
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def drop(self) -> bool:
|
|
83
|
+
"""Returns True if this is a drop policy."""
|
|
84
|
+
return self._drop
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def interval(self) -> Optional[timedelta]:
|
|
88
|
+
"""Returns the retry interval for a constant policy."""
|
|
89
|
+
return self._interval
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def max_retries(self) -> Optional[int]:
|
|
93
|
+
"""Returns the maximum retries for a constant policy."""
|
|
94
|
+
return self._max_retries
|
|
95
|
+
|
|
96
|
+
def as_dict(self) -> Dict[str, Any]:
|
|
97
|
+
"""Gets :class:`ActorReminderFailurePolicy` as a dict object."""
|
|
98
|
+
if self._drop:
|
|
99
|
+
return {'drop': {}}
|
|
100
|
+
d: Dict[str, Any] = {}
|
|
101
|
+
if self._interval is not None:
|
|
102
|
+
d['interval'] = self._interval
|
|
103
|
+
if self._max_retries is not None:
|
|
104
|
+
d['maxRetries'] = self._max_retries
|
|
105
|
+
return {'constant': d}
|
|
@@ -20,6 +20,7 @@ from dapr.actor.id import ActorId
|
|
|
20
20
|
from dapr.actor.runtime._reminder_data import ActorReminderData
|
|
21
21
|
from dapr.actor.runtime._timer_data import TIMER_CALLBACK, ActorTimerData
|
|
22
22
|
from dapr.actor.runtime.actor import Actor
|
|
23
|
+
from dapr.actor.runtime.failure_policy import ActorReminderFailurePolicy
|
|
23
24
|
from dapr.actor.runtime.mock_state_manager import MockStateManager
|
|
24
25
|
|
|
25
26
|
|
|
@@ -88,6 +89,7 @@ class MockActor(Actor):
|
|
|
88
89
|
due_time: timedelta,
|
|
89
90
|
period: Optional[timedelta] = None,
|
|
90
91
|
ttl: Optional[timedelta] = None,
|
|
92
|
+
failure_policy: Optional[ActorReminderFailurePolicy] = None,
|
|
91
93
|
) -> None:
|
|
92
94
|
"""Adds actor reminder to self._state_manager._mock_reminders.
|
|
93
95
|
|
|
@@ -96,11 +98,16 @@ class MockActor(Actor):
|
|
|
96
98
|
state (bytes): the user state passed to the reminder invocation.
|
|
97
99
|
due_time (datetime.timedelta): the amount of time to delay before invoking the reminder
|
|
98
100
|
for the first time.
|
|
99
|
-
period (datetime.timedelta): the time interval between reminder
|
|
100
|
-
the first invocation.
|
|
101
|
-
|
|
101
|
+
period (Optional[datetime.timedelta]): the optional time interval between reminder
|
|
102
|
+
invocations after the first invocation. If None, the reminder uses the Dapr
|
|
103
|
+
runtime behavior for one-off or non-periodic reminders.
|
|
104
|
+
ttl (Optional[datetime.timedelta]): the optional time interval before the reminder
|
|
105
|
+
stops firing. If None, no explicit TTL is set.
|
|
106
|
+
failure_policy (Optional[ActorReminderFailurePolicy]): the optional policy for
|
|
107
|
+
handling reminder failures. If not set, the Dapr runtime default applies
|
|
108
|
+
(3 retries per tick).
|
|
102
109
|
"""
|
|
103
|
-
reminder = ActorReminderData(name, state, due_time, period, ttl)
|
|
110
|
+
reminder = ActorReminderData(name, state, due_time, period, ttl, failure_policy)
|
|
104
111
|
self._state_manager._mock_reminders[name] = reminder # type: ignore
|
|
105
112
|
|
|
106
113
|
async def unregister_reminder(self, name: str) -> None:
|
|
@@ -12,6 +12,7 @@ dapr/actor/client/__init__.py
|
|
|
12
12
|
dapr/actor/client/proxy.py
|
|
13
13
|
dapr/actor/runtime/__init__.py
|
|
14
14
|
dapr/actor/runtime/_call_type.py
|
|
15
|
+
dapr/actor/runtime/_failure_policy.py
|
|
15
16
|
dapr/actor/runtime/_method_context.py
|
|
16
17
|
dapr/actor/runtime/_reminder_data.py
|
|
17
18
|
dapr/actor/runtime/_state_provider.py
|
|
@@ -21,6 +22,7 @@ dapr/actor/runtime/_type_utils.py
|
|
|
21
22
|
dapr/actor/runtime/actor.py
|
|
22
23
|
dapr/actor/runtime/config.py
|
|
23
24
|
dapr/actor/runtime/context.py
|
|
25
|
+
dapr/actor/runtime/failure_policy.py
|
|
24
26
|
dapr/actor/runtime/manager.py
|
|
25
27
|
dapr/actor/runtime/method_dispatcher.py
|
|
26
28
|
dapr/actor/runtime/mock_actor.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/clients/http/dapr_invocation_http_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/appcallback_pb2_grpc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dapr_dev-1.17.0.dev90 → dapr_dev-1.17.0.dev94}/dapr/proto/runtime/v1/configuration_pb2_grpc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|