Skip to content

Commit

Permalink
add job id in input dump file name
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Graber committed May 30, 2024
1 parent 9c6cccc commit 53b1417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/v01/vrp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ class Vrp < APIBase
Raven.user_context(api_key: params[:api_key]) # Filtered in sentry if user_context

vrp_params = d_params[:points] ? d_params : d_params[:vrp]
APIBase.dump_vrp_dir.write([key_print, vrp_params[:name] || "no_vrp_name", checksum].compact.join('_'), d_params.to_json) if OptimizerWrapper.config[:dump][:vrp]

Raven.extra_context(vrp_name: vrp_params[:name])

Expand All @@ -137,6 +136,7 @@ class Vrp < APIBase
else
vrp.router = OptimizerWrapper.router(OptimizerWrapper.access[api_key][:router_api_key] || profile[:router_api_key]) if OptimizerWrapper.access[api_key][:router_api_key] || profile[:router_api_key]
ret = OptimizerWrapper.wrapper_vrp(api_key, profile, vrp, checksum)
APIBase.dump_vrp_dir.write([key_print, "job_id", ret, vrp_params[:name] || "no_vrp_name", checksum].compact.join('_'), d_params.to_json) if OptimizerWrapper.config[:dump][:vrp]
count_incr :optimize, transactions: vrp.transactions
if ret.is_a?(String)
status 201
Expand Down

0 comments on commit 53b1417

Please sign in to comment.