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 <job_types.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 82 of file job_types.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 94 of file job_types.hpp.

Member Data Documentation

◆ job

JobRecord reusex::pipeline::JobEvent::job

Definition at line 103 of file job_types.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 92 of file job_types.hpp.

◆ timestamp

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

ISO-8601 UTC.

Definition at line 102 of file job_types.hpp.

◆ type

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

Definition at line 101 of file job_types.hpp.


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