pub struct ProxyGenerationQueue { /* private fields */ }Expand description
Background proxy generation queue with progress tracking.
Implementations§
Source§impl ProxyGenerationQueue
impl ProxyGenerationQueue
Sourcepub fn enqueue(&mut self, source_key: String, config: ProxyWorkflowConfig)
pub fn enqueue(&mut self, source_key: String, config: ProxyWorkflowConfig)
Enqueue a proxy generation job.
Sourcepub fn start_next(&mut self) -> Option<String>
pub fn start_next(&mut self) -> Option<String>
Start the next pending job if capacity allows.
Returns the source key of the started job, or None if queue is empty or at capacity.
Sourcepub fn update_progress(
&mut self,
source_key: &str,
fraction: f64,
stage: &str,
eta: f64,
) -> bool
pub fn update_progress( &mut self, source_key: &str, fraction: f64, stage: &str, eta: f64, ) -> bool
Update progress for an in-progress job.
Sourcepub fn mark_completed(&mut self, source_key: &str) -> bool
pub fn mark_completed(&mut self, source_key: &str) -> bool
Mark a job as completed.
Sourcepub fn mark_job_failed(&mut self, source_key: &str, error: String) -> bool
pub fn mark_job_failed(&mut self, source_key: &str, error: String) -> bool
Mark a job as failed.
Sourcepub fn get_progress(&self, source_key: &str) -> Option<&ProxyJobProgress>
pub fn get_progress(&self, source_key: &str) -> Option<&ProxyJobProgress>
Get progress for a specific job.
Sourcepub fn overall_progress(&self) -> f64
pub fn overall_progress(&self) -> f64
Total overall progress (0.0–1.0) across all jobs.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Number of pending jobs.
Sourcepub fn in_progress_count(&self) -> usize
pub fn in_progress_count(&self) -> usize
Number of in-progress jobs.
Sourcepub fn completed_count(&self) -> usize
pub fn completed_count(&self) -> usize
Number of completed jobs.
Sourcepub fn failed_count(&self) -> usize
pub fn failed_count(&self) -> usize
Number of failed jobs.
Sourcepub fn failed_jobs(&self) -> &[(String, String)]
pub fn failed_jobs(&self) -> &[(String, String)]
Get failed jobs with their error messages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProxyGenerationQueue
impl RefUnwindSafe for ProxyGenerationQueue
impl Send for ProxyGenerationQueue
impl Sync for ProxyGenerationQueue
impl Unpin for ProxyGenerationQueue
impl UnsafeUnpin for ProxyGenerationQueue
impl UnwindSafe for ProxyGenerationQueue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more