qruise flow serve¶
Serve a flow from the current Python environment.
Syntax¶
Description¶
The qruise flow serve command builds a Prefect deployment and keeps a local serving process running for it. This is useful when you want scheduled or dashboard-triggered runs to execute in the current environment, for example while developing a flow or testing dependencies that are not yet part of a deployed image.
The served deployment is registered in QruiseOS and appears on the dashboard deployment pages. The process must stay running for scheduled and manually triggered runs to execute. If the terminal process or Jupyter container stops, the served deployment stops accepting work until you run qruise flow serve again.
For production deployments that should run on the QruiseOS infrastructure without a local serving process, use qruise flow deploy.
Options¶
|
Option |
Description |
|---|---|
|
|
Path of the flow definition file to serve. Default: |
|
|
The knowledge base branch to be used by served flow runs. Can also be set using the
|
|
|
If specified, served flow run results will not be merged to the integration branch. |
|
|
Limit served runs to only specified qubits. Must have the list format. |
|
|
Specify default flags to be used in served flow runs. Must have the list format. |
|
|
Qruise profile to use for served flow runs. |
|
|
Execute only notebooks with ordinal numbers greater than or equal to the number specified. |
|
|
Execute only notebooks with ordinal numbers less than or equal to the number specified. |
|
|
Specify maximum number of tasks executing in parallel. Default: 4. |
|
|
Interval at which the served flow should run. Cannot be specified at the same time as |
|
|
Schedule on which the served flow should run, in a cron-like format. Cannot be specified at the same
time as |
|
|
Specify time zone for the cron schedule. If specified, Default: |
|
|
Prepare the served flow but do not start serving it. Use for testing. |
|
|
Keep the generated build directory after the command finishes. |
|
|
Prepare the flow in the same directory and do not copy it. Cannot be specified at the same time as
|
|
|
Path of the build directory where Default: |
|
|
Show a help message and exit. |
Environment variables¶
| Variable | Description |
|---|---|
QRUISE_FLOW_DEFAULT_INTEGRATION_BRANCH |
Default knowledge base branch to be used by the flow. See --branch. |
QRUISE_FLOW_SKIP_MERGE |
If set to True, results will not be merged by default. See --no-merge. |
QRUISE_FLOW_CRON_SCHEDULE |
Default cron schedule. Cannot be set together with QRUISE_FLOW_INTERVAL_SCHEDULE. |
QRUISE_FLOW_INTERVAL_SCHEDULE |
Default interval schedule. Cannot be set together with QRUISE_FLOW_CRON_SCHEDULE. |
Examples¶
Serve a flow for manual dashboard runs¶
This registers a served deployment in QruiseOS and waits for run requests. You can trigger the deployment from the dashboard or with qruise flow deployment run.
Serve a scheduled flow¶
qruise flow serve --flow-file $HOME/flows/my-flow.yaml --schedule "0 1 * * *" --time-zone Europe/Berlin
This keeps a local serving process active and runs the flow every day at 1:00 in the Europe/Berlin time zone while the process remains running.
Override served run defaults¶
The deployment uses these values as defaults. Manual runs can still override supported parameters when triggered from the CLI or dashboard.