ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::pipeline::JobEvent Struct Reference

One notification about a job. More...

#include <JobRunner.hpp>

Collaboration diagram for reusex::pipeline::JobEvent:

Public Types

enum class  Type { submitted , started , progress , finished }

Public Attributes

uint64_t sequence = 0
 Monotonic emission order, starting at 1.
Type type = Type::submitted
std::string timestamp
 ISO-8601 UTC.
JobRecord job

Detailed Description

One notification about a job.

Carries the full record so a listener never has to call back into the runner (which would risk lock re-entrancy).

Definition at line 100 of file JobRunner.hpp.

Member Enumeration Documentation

◆ Type

Enumerator
submitted 

Accepted onto the queue.

started 

Picked up by the worker.

progress 

Progress counters changed (throttled).

finished 

Reached a terminal status.

Definition at line 112 of file JobRunner.hpp.

Member Data Documentation

◆ job

JobRecord reusex::pipeline::JobEvent::job

Definition at line 121 of file JobRunner.hpp.

◆ sequence

uint64_t reusex::pipeline::JobEvent::sequence = 0

Monotonic emission order, starting at 1.

Events are published without the runner lock held (a listener must never run under it), so two events can reach a listener out of order — a job.submitted raised on an HTTP thread can lose the race with the job.started the worker raises microseconds later. The sequence number is assigned under the lock at the moment the state actually changed, so it is the authoritative ordering; clients must sort by it rather than by arrival.

Definition at line 110 of file JobRunner.hpp.

◆ timestamp

std::string reusex::pipeline::JobEvent::timestamp

ISO-8601 UTC.

Definition at line 120 of file JobRunner.hpp.

◆ type

Type reusex::pipeline::JobEvent::type = Type::submitted

Definition at line 119 of file JobRunner.hpp.


The documentation for this struct was generated from the following file: