From 11b787cf91dedab3393d68ea6537bf257e865c0d Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Tue, 28 Jun 2016 07:52:17 +0200 Subject: mv --- util/run_all | 2 +- util/run_beta_test | 2 +- util/run_demo | 2 +- util/run_server | 17 ----------------- util/run_session | 17 +++++++++++++++++ 5 files changed, 20 insertions(+), 20 deletions(-) delete mode 100755 util/run_server create mode 100755 util/run_session diff --git a/util/run_all b/util/run_all index 6b4b382..a873e63 100755 --- a/util/run_all +++ b/util/run_all @@ -3,7 +3,7 @@ #for i in `find ../sessions -maxdepth 1 | cut -d "/" -f 3 | grep -P "^sess_"`; do for i in `cat ../sessions/sessions | cut -f 1`; do echo $i - ./util/run_server $i & + ./util/run_session $i & sleep 60 done diff --git a/util/run_beta_test b/util/run_beta_test index 9180b52..7e8e4e7 100755 --- a/util/run_beta_test +++ b/util/run_beta_test @@ -5,6 +5,6 @@ cd /srv/postedit/lfpe/util for i in `ls -1 ../../sessions/ | grep -v "_1_" | grep -v data | grep -v toy`; do echo $i echo $(basename $i) - ./run_server $(basename $i) &; sleep 600; + ./run_session $(basename $i) &; sleep 600; done diff --git a/util/run_demo b/util/run_demo index 2140a1c..74ff529 100755 --- a/util/run_demo +++ b/util/run_demo @@ -1,4 +1,4 @@ #!/bin/zsh -x -for i in {0..24}; do for j in pe nomt; do ./util/run_server g0_"$i"_"$j" &; done; done +for i in {0..24}; do for j in pe nomt; do ./util/run_session g0_"$i"_"$j" &; done; done diff --git a/util/run_server b/util/run_server deleted file mode 100755 index a4b7a6c..0000000 --- a/util/run_server +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -x - -BASE_DIR=/srv/postedit -export LD_LIBRARY_PATH=$BASE_DIR/lib/nanomsg-0.5-beta/lib:$LD_LIBRARY_PATH -export PYTHONPATH=$BASE_DIR/lib/python:$PYTHONPATH -export GEM_PATH=$BASE_DIR/lib/ruby/:$GEM_PATH -UTIL=$BASE_DIR/lfpe/util -SESSION=$1 -SESSION_DIR=$BASE_DIR/sessions/$SESSION - -rm $SESSION_DIR/work/lockfile -rm -r $SESSION_DIR/work/ -mkdir -p $SESSION_DIR/work -cp $SESSION_DIR/data.json.original $SESSION_DIR/data.json -cp $SESSION_DIR/g/original/* $SESSION_DIR/g/ -$UTIL/../server.rb $SESSION_DIR/conf.rb &>$SESSION_DIR/work/session.out - diff --git a/util/run_session b/util/run_session new file mode 100755 index 0000000..a4b7a6c --- /dev/null +++ b/util/run_session @@ -0,0 +1,17 @@ +#!/bin/bash -x + +BASE_DIR=/srv/postedit +export LD_LIBRARY_PATH=$BASE_DIR/lib/nanomsg-0.5-beta/lib:$LD_LIBRARY_PATH +export PYTHONPATH=$BASE_DIR/lib/python:$PYTHONPATH +export GEM_PATH=$BASE_DIR/lib/ruby/:$GEM_PATH +UTIL=$BASE_DIR/lfpe/util +SESSION=$1 +SESSION_DIR=$BASE_DIR/sessions/$SESSION + +rm $SESSION_DIR/work/lockfile +rm -r $SESSION_DIR/work/ +mkdir -p $SESSION_DIR/work +cp $SESSION_DIR/data.json.original $SESSION_DIR/data.json +cp $SESSION_DIR/g/original/* $SESSION_DIR/g/ +$UTIL/../server.rb $SESSION_DIR/conf.rb &>$SESSION_DIR/work/session.out + -- cgit v1.2.3 From 394aea1ff059ba96fe99ed5e5db6a1b2210eabf6 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Tue, 28 Jun 2016 07:53:04 +0200 Subject: js/interface.js: fix lock --- js/interface.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/interface.js b/js/interface.js index 58c89d8..677c343 100644 --- a/js/interface.js +++ b/js/interface.js @@ -450,6 +450,9 @@ var request_and_process_next = function () $("#next").html("Next"); $("#oov_tgt0").focus(); not_working(false); + if (ui_type == "g") { + DE_ui_lock = true; + } // translation mode } else { -- cgit v1.2.3 From 7eda85c78af2fbe8d42580c6e3065cb254f40b26 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Tue, 28 Jun 2016 07:53:16 +0200 Subject: server.rb: fix reset --- server.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/server.rb b/server.rb index a2109db..d6cbec7 100755 --- a/server.rb +++ b/server.rb @@ -682,6 +682,7 @@ get '/reset_progress' do # reset current session update_database true $confirmed = true $last_reply = nil + $oov_corrected.clear return "progress reset: done" end -- cgit v1.2.3