(value: Any)
| 2407 | "ranked_count": 0, |
| 2408 | } |
| 2409 | thread = threading.Thread(target=_finish_daily_task, args=(task_id,), daemon=True) |
| 2410 | task["thread"] = thread |
| 2411 | _DAILY_TASKS[task_id] = task |
| 2412 | _DAILY_TASK_BY_USER[cleaned_user_id] = task_id |
| 2413 | _prune_task_registry(_DAILY_TASKS, by_user=_DAILY_TASK_BY_USER) |
| 2414 | payload = _daily_task_payload(task) |
| 2415 | |
| 2416 | # Started outside the lock on purpose: _finish_daily_task acquires |
| 2417 | # _DAILY_TASK_LOCK immediately, so starting it here would deadlock against |
| 2418 | # the block above. payload is already a snapshot taken under the lock. |
| 2419 | thread.start() |
no outgoing calls
no test coverage detected