105 std::vector<StageArtifact>
outputs);
std::vector< std::string > job_stage_names()
Every name accepted by parse_job_stage(), in pipeline order.
std::optional< JobStage > parse_job_stage(std::string_view name)
Parse a canonical stage name. Returns nullopt for an unknown name.
std::string_view pipeline_log_name(JobStage stage)
The name this stage writes into pipeline_log.stage.
std::string_view to_string(JobStatus status)
Canonical lower-case status name used on the wire.
JobStage
A pipeline stage that can be executed as a job.
@ clouds
back-project sensor frames into "cloud" + "normals"
@ instances
split semantic labels into spatial instances
@ planes
detect planar surfaces -> "planes"/"plane_*"
@ rooms
partition planes into rooms -> "rooms"
StageExecutor default_stage_executor()
The executor that actually runs the pipeline (a thin wrap of run_stage).
std::function< StageResult(const StageContext &)> StageExecutor
Stage execution strategy.
bool stage_supports_cancellation(JobStage stage)
True when the stage threads the cancel token into its inner loop, i.e.
StageResult run_stage(ProjectDB &db, const StageContext &ctx)
Run a stage against an already-open, writable ProjectDB.
One artifact a stage wrote, so a client can refresh exactly what changed instead of re-fetching every...
int64_t count
Points/rows written; -1 when not meaningful, or when the stage does not have the number in hand and c...
std::string name
Stored name, e.g.
std::string kind
"cloud" | "mesh" | "table".
Everything a stage execution needs, independent of any HTTP/CLI front end.
bool is_cancelled() const noexcept
True when a cancel token is present and set.
JobStage stage
Which stage to run.
const std::atomic_bool * cancel_token
Cooperative cancellation flag, owned by the caller. May be null.
std::filesystem::path project
Path to the .rux project the stage reads and writes.
std::string parameters
Stage parameters as a JSON object (empty string = all defaults).
std::string job_id
Identifier of the job driving this run, or empty for a direct call.
Outcome of one stage execution.
std::string message
Human-readable summary or failure reason.
static StageResult success(std::string message={})
std::vector< StageArtifact > outputs
What this run actually wrote.
bool cancelled
The stage stopped early on a cancel request.
static StageResult cancel(std::string message="cancelled")
static StageResult failure(std::string message)
bool invalid_input
The request was refused before/without doing the work because an input or a parameter was invalid,...
bool ok
The stage completed and wrote its outputs.
static StageResult success(std::string message, std::vector< StageArtifact > outputs)
static StageResult invalid(std::string message)