diff options
author | Patrick Simianer <p@simianer.de> | 2015-11-23 11:11:36 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2015-11-23 11:11:36 +0100 |
commit | 64f8d15debddb4490088c6be050ad0fdf27028a2 (patch) | |
tree | 801fb899f2932e4fd5e7917a9c56feb8127da49a /server.rb | |
parent | 3c4d0fd6fc684ef19642eb4fd889f84ea5f2f8ae (diff) |
fix /reset_progress
Diffstat (limited to 'server.rb')
-rwxr-xr-x | server.rb | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -79,8 +79,12 @@ def stop_all_daemons } end -def update_database - $db['progress'] += 1 +def update_database reset=false + if !reset + $db['progress'] += 1 + else + $db['progress'] = 0 + end j = JSON.generate $db f = WriteFile.new DB_FILE f.write j.to_s @@ -386,7 +390,7 @@ get '/reset_progress' do # reset current session $db['derivations_proc'].clear $db['feedback'].clear $db['progress'] = -1 - update_database + update_database true $confirmed = true $last_reply = nil |