Commit f5cc64e3 authored by Frédéric Escudié's avatar Frédéric Escudié
Browse files

Add more time before to declare a deadlock in ressource.

parent c8757197
......@@ -122,7 +122,7 @@ def stopRetry( priorities, max_stable_priorities ):
stop_retry = False
return stop_retry
def exec_on_shared( process_fct, shared_file, tmp_dir="/tmp", time_between_retry=0.7, max_stable_priorities=10 ):
def exec_on_shared( process_fct, shared_file, tmp_dir="/tmp", time_between_retry=0.7, max_stable_priorities=100 ):
"""
@summmary: Manages concurrent access in writing mode between several
processes on a shared file.
......
......@@ -60,7 +60,7 @@ class WorkflowsManager(object):
wdfh = open(self.dump_file, "wb")
pickle.dump(workflows_dump, wdfh)
wdfh.close()
concurrent.exec_on_shared( dump_func, self.dump_file, self.config_reader.get_tmp_directory() )
concurrent.exec_on_shared( dump_func, self.dump_file, self.config_reader.get_tmp_directory(), 1, 200 )
def get_available_workflows(self, function="process"):
if function.__class__.__name__ == "str":
......@@ -139,7 +139,7 @@ class WorkflowsManager(object):
awfh = open(self.dump_file, "wb")
pickle.dump(all_workflows_dump, awfh)
awfh.close()
concurrent.exec_on_shared( delete_func, self.dump_file, self.config_reader.get_tmp_directory() )
concurrent.exec_on_shared( delete_func, self.dump_file, self.config_reader.get_tmp_directory(), 1, 200 )
def get_workflow_errors(self, workflow_id):
workflow = self.get_workflow(workflow_id)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment