同步更新:重构路由、服务模块,更新前端构建
This commit is contained in:
21
services/checkpoints.py
Normal file
21
services/checkpoints.py
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from task_checkpoint import TaskStage, get_checkpoint_manager
|
||||
|
||||
_checkpoint_mgr = None # type: Optional[object]
|
||||
|
||||
|
||||
def init_checkpoint_manager():
|
||||
global _checkpoint_mgr
|
||||
if _checkpoint_mgr is None:
|
||||
_checkpoint_mgr = get_checkpoint_manager()
|
||||
return _checkpoint_mgr
|
||||
|
||||
|
||||
def get_checkpoint_mgr():
|
||||
return init_checkpoint_manager()
|
||||
|
||||
Reference in New Issue
Block a user