diff options
author | Patrick Simianer <p@simianer.de> | 2015-06-24 11:30:30 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2015-06-24 11:30:30 +0200 |
commit | 9a9636ec8dab9d2e650e56e56fade1f185d2ad3e (patch) | |
tree | 6138adb6a6f09cd7107394733c7eb368e38d22b5 | |
parent | 94d21adbd3e6dcff27de3207c050569e500ac2c0 (diff) |
data -> session
-rwxr-xr-x | server.rb | 4 | ||||
-rwxr-xr-x | util/run_server | 4 | ||||
-rw-r--r-- | views/debug.haml | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -210,10 +210,10 @@ get '/next' do # (receive post-edit, update models), send next translation end get '/debug' do # debug view - fn = "#{WORK_DIR}/dtrain.debug.json" + fn = "#{WORK_DIR}/dtrain.debug.json" # TODO: other tools data = JSON.parse ReadFile.read(fn).force_encoding("UTF-8") - haml :debug, :locals => { :data => data } + haml :debug, :locals => { :data => data, :session_key => SESSION_KEY } end get '/confirm' do # client confirms received translation diff --git a/util/run_server b/util/run_server index 88dadb5..651638a 100755 --- a/util/run_server +++ b/util/run_server @@ -3,6 +3,6 @@ export LD_LIBRARY_PATH=/fast_scratch/simianer/lfpe/nanomsg-0.5-beta/lib export PYTHONPATH=/fast_scratch/simianer/lfpe/python UTIL=/fast_scratch/simianer/lfpe/lfpe/util -DATA=/fast_scratch/simianer/lfpe/data/tiny_test -clear;$UTIL/kill;$UTIL/kill;$UTIL/kill;rm $DATA/work/lockfile; cp $DATA/data.json.original $DATA/data.json; $UTIL/../server.rb $DATA/conf.rb +SESSION=/fast_scratch/simianer/lfpe/sessions/tiny_test +clear;$UTIL/kill;$UTIL/kill;$UTIL/kill;rm $SESSION/work/lockfile; cp $SESSION/data.json.original $SESSION/data.json; $UTIL/../server.rb $SESSION/conf.rb diff --git a/views/debug.haml b/views/debug.haml index 2f90044..75001ae 100644 --- a/views/debug.haml +++ b/views/debug.haml @@ -2,10 +2,10 @@ !!! %html %head - %title debug view (for TODO) + %title debug view (for session ##{session_key}) %link(rel="stylesheet" type="text/css" href="debug.css") %body - %h1 debug view (for TODO) + %h1 debug view (for session ##{session_key}) %table %tr %td.noborder |