Arachne 1.0
Arachne - the perpetual stitcher of Wikidata entities.
Loading...
Searching...
No Matches
arachne::coordination Namespace Reference

Namespaces

namespace  anonymous_namespace{coordinator.cpp}

Classes

struct  intake_request
struct  envelope_record
struct  state_event
struct  accumulation_policy
struct  accumulation_state
struct  verification_issue
class  operational_ledger
class  domain_lock

Enumerations

enum class  cocoon_status {
  received , needs_format_fix , waiting_approval , accepted ,
  waiting_processing , processing , integrated , failed ,
  rejected , superseded
}

Functions

std::string_view to_string (const cocoon_status status) noexcept
cocoon_status cocoon_status_from_string (const std::string_view value)
bool can_transition (const cocoon_status from, const cocoon_status to) noexcept
bool path_is_within (const std::filesystem::path &path, const std::filesystem::path &possible_parent)
void reject_inbox_deletion_target (const std::filesystem::path &target, const std::filesystem::path &inbox_root)

Enumeration Type Documentation

◆ cocoon_status

Function Documentation

◆ can_transition()

bool arachne::coordination::can_transition ( const cocoon_status from,
const cocoon_status to )
nodiscardnoexcept

◆ cocoon_status_from_string()

cocoon_status arachne::coordination::cocoon_status_from_string ( const std::string_view value)
nodiscard

Definition at line 519 of file coordinator.cpp.

519 {
520 constexpr std::array statuses {
526 };
527 for (const auto status : statuses) {
528 if (to_string(status) == value) {
529 return status;
530 }
531 }
532 throw std::invalid_argument("unknown cocoon status: " + std::string(value));
533}
std::string_view to_string(const cocoon_status status) noexcept

◆ path_is_within()

bool arachne::coordination::path_is_within ( const std::filesystem::path & path,
const std::filesystem::path & possible_parent )
nodiscard

Definition at line 1542 of file coordinator.cpp.

1554 {
1555 throw std::logic_error(
1556 "running product run changed during completion"

◆ reject_inbox_deletion_target()

void arachne::coordination::reject_inbox_deletion_target ( const std::filesystem::path & target,
const std::filesystem::path & inbox_root )

Definition at line 1558 of file coordinator.cpp.

1566 {
1567 throw_sqlite(database, "bind product run attempt number");

◆ to_string()

std::string_view arachne::coordination::to_string ( const cocoon_status status)
nodiscardnoexcept

Definition at line 493 of file coordinator.cpp.

493 {
494 switch (status) {
496 return "received";
498 return "needs_format_fix";
500 return "waiting_approval";
502 return "accepted";
504 return "waiting_processing";
506 return "processing";
508 return "integrated";
510 return "failed";
512 return "rejected";
514 return "superseded";
515 }
516 return "received";
517}

References accepted, failed, integrated, needs_format_fix, processing, received, rejected, superseded, waiting_approval, and waiting_processing.