mirror of
https://git.asonix.dog/asonix/background-jobs.git
synced 2024-11-25 05:21:00 +00:00
clippy
This commit is contained in:
parent
51afbc89ce
commit
9c77c20883
2 changed files with 5 additions and 13 deletions
|
@ -5,7 +5,7 @@ use time::{Duration, OffsetDateTime};
|
||||||
use tracing::trace;
|
use tracing::trace;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
|
#[derive(Clone, Debug, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
||||||
/// Information about the sate of an attempted job
|
/// Information about the sate of an attempted job
|
||||||
pub struct ReturnJobInfo {
|
pub struct ReturnJobInfo {
|
||||||
pub(crate) id: Uuid,
|
pub(crate) id: Uuid,
|
||||||
|
@ -35,7 +35,7 @@ impl ReturnJobInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
|
#[derive(Clone, Debug, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
||||||
/// Information about a newly created job
|
/// Information about a newly created job
|
||||||
pub struct NewJobInfo {
|
pub struct NewJobInfo {
|
||||||
/// Name of the job
|
/// Name of the job
|
||||||
|
@ -113,7 +113,7 @@ impl NewJobInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
|
#[derive(Clone, Debug, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
|
||||||
/// Metadata pertaining to a job that exists within the background_jobs system
|
/// Metadata pertaining to a job that exists within the background_jobs system
|
||||||
///
|
///
|
||||||
/// Although exposed publically, this type should only really be handled by the library itself, and
|
/// Although exposed publically, this type should only really be handled by the library itself, and
|
||||||
|
|
|
@ -258,11 +258,7 @@ pub mod memory_storage {
|
||||||
|
|
||||||
self.timer.timeout(
|
self.timer.timeout(
|
||||||
duration,
|
duration,
|
||||||
inner
|
inner.queues.entry(queue.to_string()).or_default().listen(),
|
||||||
.queues
|
|
||||||
.entry(queue.to_string())
|
|
||||||
.or_insert(Event::new())
|
|
||||||
.listen(),
|
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -275,11 +271,7 @@ pub mod memory_storage {
|
||||||
|
|
||||||
inner.job_queues.insert(id, queue.to_owned());
|
inner.job_queues.insert(id, queue.to_owned());
|
||||||
|
|
||||||
inner
|
inner.queues.entry(queue.to_string()).or_default().notify(1);
|
||||||
.queues
|
|
||||||
.entry(queue.to_string())
|
|
||||||
.or_insert(Event::new())
|
|
||||||
.notify(1);
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue