projects
/
django_unres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d81ac65
)
show min running %
author
Cezary Czaplewski
<czarek@chem.univ.gda.pl>
Wed, 31 Jan 2018 17:59:54 +0000
(18:59 +0100)
committer
Cezary Czaplewski
<czarek@chem.univ.gda.pl>
Wed, 31 Jan 2018 17:59:54 +0000
(18:59 +0100)
django_simple/todo/views.py
patch
|
blob
|
history
diff --git
a/django_simple/todo/views.py
b/django_simple/todo/views.py
index
45741f2
..
0e61389
100644
(file)
--- a/
django_simple/todo/views.py
+++ b/
django_simple/todo/views.py
@@
-918,6
+918,20
@@
def refresh_done0(task):
elif os.path.isfile(task.jobdirname+'/file_GB000.stat') and not task.done:
if (task.type=='min'):
task.running =1
+ with open(task.jobdirname+'/file.out_GB000', 'r') as f:
+ line=''
+ for line in f:
+ pass
+ if line != '':
+ last = line.split()[0]
+ else:
+ last = 0
+ try:
+ task.running=int(1+int(last)*100.0/task.min_maxmin)
+ except:
+ pass
+ if task.running>100:
+ task.running=100
else:
with open(task.jobdirname+'/file_GB000.stat', 'r') as f:
line=''