From d0935206145a975be89f603f39a1cd932e6e2309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Coletta?= Date: Wed, 7 Feb 2024 12:59:30 +0100 Subject: [PATCH] chore!: Rename helpers mod to worker_utils --- src/lib.rs | 4 ++-- src/runner.rs | 2 +- src/{helpers.rs => worker_utils.rs} | 0 tests/worker_utils_cleanup.rs | 2 +- tests/worker_utils_reschedule_jobs.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename src/{helpers.rs => worker_utils.rs} (100%) diff --git a/src/lib.rs b/src/lib.rs index 660866e..25fd345 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,11 +1,11 @@ pub mod builder; pub mod errors; -pub mod helpers; pub mod job; pub mod runner; pub mod sql; pub mod streams; pub mod utils; +pub mod worker_utils; pub use crate::job::*; pub use crate::sql::add_job::{JobKeyMode, JobSpec}; @@ -14,5 +14,5 @@ pub use graphile_worker_macros::task; pub use graphile_worker_task_handler::*; pub use builder::{WorkerBuildError, WorkerOptions}; -pub use helpers::WorkerUtils; pub use runner::{Worker, WorkerContext}; +pub use worker_utils::WorkerUtils; diff --git a/src/runner.rs b/src/runner.rs index 1855c13..47fe881 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -5,10 +5,10 @@ use std::time::Duration; use std::{collections::HashMap, time::Instant}; use crate::errors::GraphileWorkerError; -use crate::helpers::WorkerUtils; use crate::job::Job; use crate::sql::{get_job::get_job, task_identifiers::TaskDetails}; use crate::streams::{job_signal_stream, job_stream}; +use crate::worker_utils::WorkerUtils; use futures::{try_join, StreamExt, TryStreamExt}; use getset::Getters; use graphile_worker_crontab_runner::{cron_main, ScheduleCronJobError}; diff --git a/src/helpers.rs b/src/worker_utils.rs similarity index 100% rename from src/helpers.rs rename to src/worker_utils.rs diff --git a/tests/worker_utils_cleanup.rs b/tests/worker_utils_cleanup.rs index 785abbf..5a7b92c 100644 --- a/tests/worker_utils_cleanup.rs +++ b/tests/worker_utils_cleanup.rs @@ -1,5 +1,5 @@ use chrono::Utc; -use graphile_worker::{helpers::CleanupTask, JobSpec}; +use graphile_worker::{worker_utils::CleanupTask, JobSpec}; use indoc::formatdoc; use crate::helpers::with_test_db; diff --git a/tests/worker_utils_reschedule_jobs.rs b/tests/worker_utils_reschedule_jobs.rs index 83b46bb..f7123e7 100644 --- a/tests/worker_utils_reschedule_jobs.rs +++ b/tests/worker_utils_reschedule_jobs.rs @@ -1,5 +1,5 @@ use chrono::{Timelike, Utc}; -use graphile_worker::helpers::RescheduleJobOptions; +use graphile_worker::worker_utils::RescheduleJobOptions; use crate::helpers::{with_test_db, SelectionOfJobs};