review classifier: queued review requests survive a restart and are never refused
This commit is contained in:
parent
22256893fc
commit
d6aa83146a
7 changed files with 1021 additions and 454 deletions
|
|
@ -1,6 +1,7 @@
|
|||
//! The review classifier's runs: the subject swarm-controller sends a run
|
||||
//! on, and what travels each way. A try-out and a requested review are the
|
||||
//! same request.
|
||||
//! same request. Also the stream the controller queues requested reviews in,
|
||||
//! which the auth-callout responder grants to the controller alone.
|
||||
//!
|
||||
//! Three crates name these: the controller sends the request, the classifier
|
||||
//! answers it, and the auth-callout responder grants the one subject to each.
|
||||
|
|
@ -20,6 +21,19 @@ pub const SUBJECT: &str = "$SWARM.review-classifier.try-out";
|
|||
/// the requests instead of running each one twice.
|
||||
pub const QUEUE_GROUP: &str = "review-classifier";
|
||||
|
||||
/// The work-queue stream holding the review requests the controller has
|
||||
/// accepted and not yet finished. The controller is its one publisher and its
|
||||
/// one consumer.
|
||||
pub const REQUEST_STREAM: &str = "review-requests";
|
||||
|
||||
/// The subjects of [`REQUEST_STREAM`] start with this; each PR's request is
|
||||
/// one subject below it.
|
||||
pub const REQUEST_SUBJECT_PREFIX: &str = "$SWARM.review-request";
|
||||
|
||||
/// The durable consumer on [`REQUEST_STREAM`] the controller takes requests
|
||||
/// from.
|
||||
pub const REQUEST_CONSUMER: &str = "swarm-controller";
|
||||
|
||||
/// The most classifications one run carries.
|
||||
pub const MAX_CLASSIFICATIONS: usize = 10;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue