pub struct BgTaskRegistry { /* private fields */ }Implementations§
Source§impl BgTaskRegistry
impl BgTaskRegistry
pub fn new(progress_sender: SharedProgressSender) -> Self
Sourcepub fn set_compressor<F>(&self, compressor: F)
pub fn set_compressor<F>(&self, compressor: F)
Install the output-compression callback. Called by main.rs after
AppContext is constructed so that snapshot/completion paths can
invoke compress::compress_with_registry without holding a context
reference. When called multiple times, the latest installation wins.
pub fn configure_long_running_reminders(&self, enabled: bool, interval_ms: u64)
pub fn spawn( &self, command: &str, session_id: String, workdir: PathBuf, env: HashMap<String, String>, timeout: Option<Duration>, storage_dir: PathBuf, max_running: usize, notify_on_completion: bool, compressed: bool, project_root: Option<PathBuf>, ) -> Result<String, String>
pub fn replay_session( &self, storage_dir: &Path, session_id: &str, ) -> Result<(), String>
pub fn status( &self, task_id: &str, session_id: &str, project_root: Option<&Path>, storage_dir: Option<&Path>, preview_bytes: usize, ) -> Option<BgTaskSnapshot>
pub fn maybe_gc_persisted(&self, storage_dir: &Path) -> Result<usize, String>
pub fn list(&self, preview_bytes: usize) -> Vec<BgTaskSnapshot>
pub fn kill( &self, task_id: &str, session_id: &str, ) -> Result<BgTaskSnapshot, String>
pub fn promote(&self, task_id: &str, session_id: &str) -> Result<bool, String>
pub fn cleanup_finished(&self, older_than: Duration)
pub fn drain_completions(&self) -> Vec<BgCompletion>
pub fn drain_completions_for_session( &self, session_id: Option<&str>, ) -> Vec<BgCompletion>
pub fn pending_completions_for_session( &self, session_id: &str, ) -> Vec<BgCompletion>
pub fn detach(&self)
pub fn shutdown(&self)
Trait Implementations§
Source§impl Clone for BgTaskRegistry
impl Clone for BgTaskRegistry
Source§fn clone(&self) -> BgTaskRegistry
fn clone(&self) -> BgTaskRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BgTaskRegistry
impl RefUnwindSafe for BgTaskRegistry
impl Send for BgTaskRegistry
impl Sync for BgTaskRegistry
impl Unpin for BgTaskRegistry
impl UnsafeUnpin for BgTaskRegistry
impl UnwindSafe for BgTaskRegistry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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