forked from Behordeun/digiLocker_mod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
37 lines (30 loc) · 977 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from app import app
import settings
# from dapr.actor import ActorInterface, actormethod
from dapr.actor.runtime.config import (
ActorRuntimeConfig,
ActorReentrancyConfig,
) # , ActorTypeConfig
from flask_dapr.actor import DaprActor
# from dapr.conf import settings
from dapr_config.demo_actor import DemoActor
# Enable DaprActor Extension
actor = DaprActor(app)
app.config.from_object(settings)
# Register DemoActor
actor.register_actor(DemoActor)
# Create ActorRuntime configuration
# actor_runtime_config = ActorRuntimeConfig(
# actor_idle_timeout=timedelta(hours=1),
# actor_scan_interval=timedelta(seconds=30),
# drain_ongoing_call_timeout=timedelta(minutes=1),
# drain_rebalanced_actors=True,
# reentrancy=ActorReentrancyConfig(enabled=False),
# reminders_storage_partitions=7
# )
if __name__ == "__main__":
app.run(
host=app.config["APPLICATION_HOST"],
debug=True,
port=app.config["APPLICATION_PORT"],
)