access_requests=get_requests(tmp_dir,shared_file)# Retrieve all access requests
priorities.append(get_priority(access_requests,current_request))# Return the position of the current request in requests execution order
ifpriorities[-1]==1andnotos.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()
# Process
fct_return=process_fct()
retry=False
else:
ifstopRetry(priorities,max_stable_priorities):
raiseException("Dead lock to access at the ressource.")