Skip to content
Snippets Groups Projects
Commit e78c7e2f authored by ThibautDemare's avatar ThibautDemare
Browse files

Make the code clearer by renaming some variables and adding some comments

parent fe5981f1
Branches
No related merge requests found
...@@ -21,17 +21,25 @@ def checkForBackupNeedsAndWait(): ...@@ -21,17 +21,25 @@ def checkForBackupNeedsAndWait():
if now > (lastBackup + timeBetweenTwoBackup): if now > (lastBackup + timeBetweenTwoBackup):
backup() backup()
# Sleep a bit: don't need to be awken all the time # Sleep a bit: don't need to be awaken all the time
time.sleep(350) time.sleep(350)
# The number of available CPU
nbCpus = multiprocessing.cpu_count() nbCpus = multiprocessing.cpu_count()
# The date of the last backup done
lastBackup = datetime.now() lastBackup = datetime.now()
maxNbSim = 4 # The index of the first simulation
startingIndex = 1
nbSimStarted = 1 # The index of the last simulation
while nbSimStarted <= maxNbSim: endingIndex = 4
# The index of the simulation to start next
nbSimStarted = startingIndex
while nbSimStarted <= endingIndex:
resultPath = "run"+str(nbSimStarted) resultPath = "run"+str(nbSimStarted)
run("cp -r ./source ./"+str(resultPath), shell = True) run("cp -r ./source ./"+str(resultPath), shell = True)
......
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