22 lines
460 B
Python
22 lines
460 B
Python
#!/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()
|
|
|