mirror of
https://git.asonix.dog/asonix/background-jobs.git
synced 2024-11-21 19:40:59 +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 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
|
||||
pub struct ReturnJobInfo {
|
||||
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
|
||||
pub struct NewJobInfo {
|
||||
/// 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
|
||||
///
|
||||
/// 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(
|
||||
duration,
|
||||
inner
|
||||
.queues
|
||||
.entry(queue.to_string())
|
||||
.or_insert(Event::new())
|
||||
.listen(),
|
||||
inner.queues.entry(queue.to_string()).or_default().listen(),
|
||||
)
|
||||
};
|
||||
|
||||
|
@ -275,11 +271,7 @@ pub mod memory_storage {
|
|||
|
||||
inner.job_queues.insert(id, queue.to_owned());
|
||||
|
||||
inner
|
||||
.queues
|
||||
.entry(queue.to_string())
|
||||
.or_insert(Event::new())
|
||||
.notify(1);
|
||||
inner.queues.entry(queue.to_string()).or_default().notify(1);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue