pub struct ImportJob {
pub run_id: i64,
pub resource: String,
pub spec: RunSpec,
pub actor: Actor,
pub hash: String,
}Expand description
The job an import runs as: the run’s id and everything the worker needs
to pick the file up and write the rows. Pushed by start; the handler
[job_reg] builds reads the file from the private disk.
Fields§
§run_id: i64§resource: StringThe resource’s path as its descriptor declares it (/products).
spec: RunSpec§actor: Actor§hash: StringThe stored file’s hash on the private disk.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ImportJob
impl<'de> Deserialize<'de> for ImportJob
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Job for ImportJob
impl Job for ImportJob
Source§fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
_cx: &'life1 JobCx,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
_cx: &'life1 JobCx,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Never called: the handler registered by the admin router runs the job, since it needs the resource’s prepared form and the disk.
Source§fn tries(&self) -> u32
fn tries(&self) -> u32
One attempt: rows written before a failure stay, so a second pass would write them again.
Source§const NAME: &'static str = "laterite.import::run"
const NAME: &'static str = "laterite.import::run"
The job’s name, unique across the application:
acme.blog::send_digest.Source§fn unique_key(&self) -> Option<String>
fn unique_key(&self) -> Option<String>
A key no two pending jobs may share: a push while one with the same
key waits is dropped.
None unless overridden.Source§fn queue(&self) -> String
fn queue(&self) -> String
The queue the job lands on.
DEFAULT_QUEUE unless overridden.Auto Trait Implementations§
impl Freeze for ImportJob
impl RefUnwindSafe for ImportJob
impl Send for ImportJob
impl Sync for ImportJob
impl Unpin for ImportJob
impl UnsafeUnpin for ImportJob
impl UnwindSafe for ImportJob
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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