Project

General

Profile

Feature #23183

Make endProcess idempotent

Added by Marc Mengel 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/28/2019
Due date:
% Done:

0%

Estimated time:
Duration:

Description

From RITM0858327

$ samweb stop-process $purl $cpid
Process 54886913 is already ended

$ ifdh endProcess $purl $cpid
Exception: http://samwebgpvm03.fnal.gov:8480/sam/uboone/stations/uboone/projects/name/uboonepro_prod_swizzle2_binary_crt_merge_run4b_bnb_recur1_20190731225930_run_20394_20190731225946/processes/54886913/endProcess
HTTP-Status: 409
Error text is:
Process 54886913 is already ended

I believe that a sam station may decide to terminate processes on its own. Therefore practice of stopping an already-stopped process should not produce an error. That is, the line mode command should not return a nonzero exit status, and it should not output scary error messages.

Note that for ifdh, this could be accomplished by having the server return like a 204 or other 200 series status code..



Also available in: Atom PDF