We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10e9b7f commit dea70a6Copy full SHA for dea70a6
services/efs-guardian/src/simcore_service_efs_guardian/services/background_tasks_setup.py
@@ -14,6 +14,10 @@
14
15
_logger = logging.getLogger(__name__)
16
17
+_SEC = 1000 # in ms
18
+_MIN = 60 * _SEC # in ms
19
+_HOUR = 60 * _MIN # in ms
20
+
21
22
class EfsGuardianBackgroundTask(TypedDict):
23
name: str
@@ -39,8 +43,8 @@ async def _startup() -> None:
39
43
exclusive_task = start_exclusive_periodic_task(
40
44
get_redis_lock_client(app),
41
45
task["task_func"],
42
- task_period=timedelta(seconds=3600), # 1 hour
- retry_after=timedelta(seconds=300), # 5 minutes
46
+ task_period=timedelta(seconds=1 * _HOUR),
47
+ retry_after=timedelta(seconds=5 * _MIN),
48
task_name=task["name"],
49
app=app,
50
)
0 commit comments