flw retrieves completed job results from a workspace processed by nrvnad.
Usage
Arguments
Directory path for job storage. Must match the workspace used by
nrvnad.Specific job ID to retrieve. If omitted, retrieves the latest completed job. Can be read from stdin for piping.
Options
Wait for job to complete before returning. Polls every 100ms until status is DONE or FAILED.
Display help message.
Display version number.
Environment Variables
Log level: ERROR, WARN, INFO, DEBUG, TRACE (default: WARN for clean output).
Output
On success,flw outputs the job result to stdout:
Examples
Retrieve latest job
Retrieve specific job
Wait for job completion
Pipe from wrk
Store result in variable
Chain with job submission
Behavior
Job Resolution
- If
job_idis provided as argument, retrieves that specific job - If
job_idis omitted, retrieves the latest job fromoutput/orfailed/directories - If stdin is not a TTY, reads
job_idfrom stdin (for piping)
Status Handling
- DONE: Outputs job content to stdout, exit code 0
- FAILED: Outputs error to stderr, exit code 1
- QUEUED/RUNNING: Outputs status message to stderr, exit code 2
- MISSING: Outputs “Job not found” to stderr, exit code 1
Wait Mode
When--wait is used:
- Polls job status every 100ms
- Blocks until status is DONE or FAILED
- Then returns the result or error
Exit Codes
0- Success, job completed1- Error or job failed2- Job not ready (still queued or running)
Job Status Values
QUEUED- Job is waiting to be processedRUNNING- Job is currently being processedDONE- Job completed successfullyFAILED- Job failed during processingMISSING- Job ID not found in workspace
Error Messages
Errors are written to stderr:Integration Pattern
The recommended workflow combineswrk and flw: