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 22
22
from cortex .lib .log import refresh_logger , cx_logger
23
23
from cortex .lib .exceptions import CortexException , UserException , UserRuntimeException
24
24
from cortex .lib .type .model import Model , get_model_signature_map
25
+ from cortex .lib .storage .concurrency import FileLock
25
26
from cortex import consts
26
27
from cortex .lib import util
27
28
@@ -134,7 +135,8 @@ def class_impl(self, project_dir):
134
135
target_class_name , validations = self .get_target_and_validations ()
135
136
136
137
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 ))
138
140
except CortexException as e :
139
141
e .wrap ("error in " + self .path )
140
142
raise
You can’t perform that action at this time.
0 commit comments