From 9a9636ec8dab9d2e650e56e56fade1f185d2ad3e Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Wed, 24 Jun 2015 11:30:30 +0200 Subject: data -> session --- server.rb | 4 ++-- util/run_server | 4 ++-- views/debug.haml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server.rb b/server.rb index 2122979..beb7202 100755 --- a/server.rb +++ b/server.rb @@ -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 -- cgit v1.2.3