Skip to content

Commit 4130439

Browse files
committed
Fmt
1 parent 9c93071 commit 4130439

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

rfd-model/src/storage/postgres.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,12 @@ impl JobStore for PostgresStore {
430430
) -> Result<Vec<Job>, StoreError> {
431431
let mut query = job::dsl::job.into_boxed();
432432

433-
let JobFilter { id, sha, processed, started } = filter;
433+
let JobFilter {
434+
id,
435+
sha,
436+
processed,
437+
started,
438+
} = filter;
434439

435440
if let Some(id) = id {
436441
query = query.filter(job::id.eq_any(id));

rfd-processor/src/processor.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ pub async fn processor(ctx: Arc<Context>) -> Result<(), JobError> {
2525
loop {
2626
let jobs = JobStore::list(
2727
&ctx.db.storage,
28-
JobFilter::default().processed(Some(false)).started(Some(false)),
28+
JobFilter::default()
29+
.processed(Some(false))
30+
.started(Some(false)),
2931
&pagination,
3032
)
3133
.await?;
@@ -36,7 +38,6 @@ pub async fn processor(ctx: Arc<Context>) -> Result<(), JobError> {
3638
// Make the job as started
3739
match JobStore::start(&ctx.db.storage, job.id).await {
3840
Ok(Some(job)) => {
39-
4041
let location = GitHubRfdLocation {
4142
owner: job.owner.clone(),
4243
repo: job.repository.clone(),
@@ -55,11 +56,9 @@ pub async fn processor(ctx: Arc<Context>) -> Result<(), JobError> {
5556

5657
match updater.handle(&ctx, &[update]).await {
5758
Ok(_) => {
58-
let _ = JobStore::complete(&ctx.db.storage, job.id)
59-
.await
60-
.tap_err(|err| {
61-
tracing::error!(?err, "Failed to mark job as completed")
62-
});
59+
let _ = JobStore::complete(&ctx.db.storage, job.id).await.tap_err(
60+
|err| tracing::error!(?err, "Failed to mark job as completed"),
61+
);
6362
}
6463
Err(err) => {
6564
tracing::error!(?err, "RFD update failed");
@@ -72,7 +71,11 @@ pub async fn processor(ctx: Arc<Context>) -> Result<(), JobError> {
7271
tracing::error!(?job, "Job that was scheduled to run has gone missing! Was it started by a different task?");
7372
}
7473
Err(err) => {
75-
tracing::warn!(?job, ?err, "Failed to start job. Was it previously started?");
74+
tracing::warn!(
75+
?job,
76+
?err,
77+
"Failed to start job. Was it previously started?"
78+
);
7679
}
7780
}
7881

0 commit comments

Comments
 (0)