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

Increase speed on slow file systems.

parent bd0c9f93
......@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
__license__ = 'GNU General Public License'
__version__ = '0.1.0'
__version__ = '0.2.0'
import os
import re
......@@ -176,6 +176,7 @@ def exec_on_shared( process_fct, shared_file, tmp_dir="/tmp", time_between_retry
priorities.append( get_priority(access_requests, current_request) ) # Return the position of the current request in requests execution order
if priorities[-1] == 1 and not os.path.exists(lock_file): # lock_file prevents error with jobs launched after the job with access to the ressource but on node with a bad timestamp
open(lock_file, "w").close()
os.remove( current_request_file )
# Process
fct_return = process_fct()
retry = False
......
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