[ 
https://issues.apache.org/jira/browse/CAMEL-25391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18127622#comment-18127622
 ] 

Claus Ibsen commented on CAMEL-25391:
-------------------------------------

PR: https://github.com/apache/camel/pull/27914

ProcessFinder (find/findAll/requireOne/requireAny, exit code 3) replaces the 
findPids copies and RuntimeHelper process discovery; ActionClient 
(execute/send, ActionResult OK/ERROR/TIMEOUT/UNCONFIRMED with exit codes) picks 
the protocol by Camel version (request files from 4.21, confirmations from 
4.24) and RuntimeHelper.executeAction delegates to it; TimeoutConverter makes 
the existing --timeout options take durations such as 30s. As agreed: a pid 
must be a running integration, and integrations whose Camel has stopped are 
skipped. The getJsonObject/prepareAction/waitForOutputFile users move to 
ActionClient with the command PRs (CAMEL-25393 onwards).

_Claude Code on behalf of davsclaus (Claus Ibsen)_

> camel-jbang - ActionClient, ProcessFinder and shared --timeout
> --------------------------------------------------------------
>
>                 Key: CAMEL-25391
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25391
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> * {{ActionClient.execute(pid, action, configure, timeout)}} returning 
> {{ActionResult\{OK|ERROR|TIMEOUT\}}}; uses request-id action files 
> ({{<pid>-action-<id>.json}}), falls back to the legacy shared file for 
> integrations older than 4.21 (based on the version in the status file). 
> Replaces {{getJsonObject}}, {{prepareAction}} and the private 
> {{waitForOutputFile}} copies; {{RuntimeHelper.executeAction}} delegates to it.
> * Missing ack: integrations 4.24+ -> exit 4; older -> warning "sent, not 
> confirmed", exit 0.
> * {{ProcessFinder}} replaces the 6 {{findPids}} copies and 
> {{RuntimeHelper.discoverProcesses}}: numeric pid requires a live Camel status 
> file; {{requireOne}} (0 or >1 match -> exit 3 with message listing the pids); 
> {{findAll}} (explicit name, no match -> exit 3); skip integrations in phase 
> >= 9.
> * Shared {{--timeout}} on commands talking to a running integration, parsed 
> with {{TimeUtils.toMilliSeconds}} (bare number = millis, so existing 
> {{--timeout=20000}} is unchanged; {{30s}} accepted). {{cmd sql 
> --query-timeout}} keeps seconds.
> _Claude Code on behalf of davsclaus (Claus Ibsen)_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to