File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
pkg/workloads/cortex/lib/type Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 2222from cortex .lib .log import refresh_logger , cx_logger
2323from cortex .lib .exceptions import CortexException , UserException , UserRuntimeException
2424from cortex .lib .type .model import Model , get_model_signature_map
25+ from cortex .lib .storage .concurrency import FileLock
2526from cortex import consts
2627from cortex .lib import util
2728
@@ -134,7 +135,8 @@ def class_impl(self, project_dir):
134135 target_class_name , validations = self .get_target_and_validations ()
135136
136137 try :
137- impl = self ._load_module ("cortex_predictor" , os .path .join (project_dir , self .path ))
138+ with FileLock ("/run/init_stagger.lock" ):
139+ impl = self ._load_module ("cortex_predictor" , os .path .join (project_dir , self .path ))
138140 except CortexException as e :
139141 e .wrap ("error in " + self .path )
140142 raise
You can’t perform that action at this time.
0 commit comments