From 5490f6214f3a22216f7980c7d46f6d9fe10a4924 Mon Sep 17 00:00:00 2001 From: gebele Date: Thu, 11 Jul 2019 15:59:13 +0000 Subject: simplify js code;reorder js code; --- application.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'application.rb') diff --git a/application.rb b/application.rb index 4ed4a31..76137b9 100644 --- a/application.rb +++ b/application.rb @@ -85,6 +85,13 @@ options "*" do end get '/predict/?' do + if params[:tpid] + begin + Process.kill(9,params[:tpid].to_i) if !params[:tpid].blank? + rescue + nil + end + end @models = OpenTox::Model::Validation.all @endpoints = @models.collect{|m| m.endpoint}.sort.uniq @models.count > 0 ? (haml :predict) : (haml :info) -- cgit v1.2.3