Skip to content

Commit 3a629f6

Browse files
0xPoeTurbo87
authored andcommitted
refactor: rename to SendTokenExpiryNotifications
Signed-off-by: hi-rustin <[email protected]>
1 parent 031b1dd commit 3a629f6

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/admin/enqueue_job.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub enum Command {
4444
#[arg(long)]
4545
force: bool,
4646
},
47-
CheckAboutToExpireToken,
47+
SendTokenExpiryNotifications,
4848
}
4949

5050
pub fn run(command: Command) -> Result<()> {
@@ -131,8 +131,8 @@ pub fn run(command: Command) -> Result<()> {
131131

132132
jobs::CheckTyposquat::new(&name).enqueue(conn)?;
133133
}
134-
Command::CheckAboutToExpireToken => {
135-
jobs::CheckAboutToExpireToken.enqueue(conn)?;
134+
Command::SendTokenExpiryNotifications => {
135+
jobs::SendTokenExpiryNotifications.enqueue(conn)?;
136136
}
137137
};
138138

src/worker/jobs/expiry_notification.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ const MAX_ROWS: i64 = 10000;
2323
/// It checks if the token is about to reach its expiry date.
2424
/// If the token is about to expire, the job triggers a notification.
2525
#[derive(Default, Serialize, Deserialize, Debug)]
26-
pub struct CheckAboutToExpireToken;
26+
pub struct SendTokenExpiryNotifications;
2727

28-
impl BackgroundJob for CheckAboutToExpireToken {
28+
impl BackgroundJob for SendTokenExpiryNotifications {
2929
const JOB_NAME: &'static str = "expiry_notification";
3030

3131
type Context = Arc<Environment>;

src/worker/jobs/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub use self::downloads::{
2222
CleanProcessedLogFiles, ProcessCdnLog, ProcessCdnLogQueue, UpdateDownloads,
2323
};
2424
pub use self::dump_db::DumpDb;
25-
pub use self::expiry_notification::CheckAboutToExpireToken;
25+
pub use self::expiry_notification::SendTokenExpiryNotifications;
2626
pub use self::git::{NormalizeIndex, SquashIndex, SyncToGitIndex, SyncToSparseIndex};
2727
pub use self::readmes::RenderAndUploadReadme;
2828
pub use self::sync_admins::SyncAdmins;

src/worker/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ impl RunnerExt for Runner<Arc<Environment>> {
3434
.register_job_type::<jobs::SyncToSparseIndex>()
3535
.register_job_type::<jobs::UpdateDownloads>()
3636
.register_job_type::<jobs::UpdateDefaultVersion>()
37-
.register_job_type::<jobs::CheckAboutToExpireToken>()
37+
.register_job_type::<jobs::SendTokenExpiryNotifications>()
3838
}
3939
}

0 commit comments

Comments
 (0)