diff options
author | mr <mr@mrautenberg.de> | 2010-12-14 12:47:16 +0100 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2010-12-14 12:47:16 +0100 |
commit | baecdfe03a6bff2ee28d687f77b1c6606e102003 (patch) | |
tree | 9853a791f1066dbe4f75ba625836633d6de23952 /lazar.rb | |
parent | 1981b852f31223227fc1d384111d5cff59db07ea (diff) |
remove token_id from saving in table
Diffstat (limited to 'lazar.rb')
-rw-r--r-- | lazar.rb | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -69,6 +69,8 @@ end # @param [optional,Header] Accept Content-type of prediction, can be either `application/rdf+xml or application/x-yaml` # @return [text/uri-list] URI of prediction task (dataset prediction) or prediction dataset (compound prediction) post '/:id/?' do + token_id = params[:token_id] if params[:token_id] + token_id = request.env["HTTP_TOKEN_ID"] if !token_id and request.env["HTTP_TOKEN_ID"] @lazar = YAML.load ModelStore.get(params[:id]).yaml @@ -81,7 +83,7 @@ post '/:id/?' do cache = PredictionCache.first(:model_uri => @lazar.uri, :compound_uri => compound_uri) return cache.dataset_uri if cache and uri_available?(cache.dataset_uri) begin - prediction_uri = @lazar.predict(compound_uri,true).uri + prediction_uri = @lazar.predict(compound_uri,true,token_id).uri PredictionCache.create(:model_uri => @lazar.uri, :compound_uri => compound_uri, :dataset_uri => prediction_uri) prediction_uri rescue |