Skip to content

Commit ac5e0d6

Browse files
committed
refactor(job): rename Tick message to Execute
1 parent 75d9ac2 commit ac5e0d6

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/actor/job/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ impl JobActor {
135135

136136
tokio::select! {
137137
_ = sleep_until(deadline) => {
138-
// Time to execute - send tick
139-
if addr.send(Tick).await.is_err() {
138+
if addr.send(Execute).await.is_err() {
140139
break;
141140
}
142141
}
@@ -184,13 +183,13 @@ impl Actor for JobActor {
184183

185184
// === Messages ===
186185

187-
/// Internal tick to trigger job execution
188-
struct Tick;
186+
/// Signal from scheduler that it's time to execute the job
187+
struct Execute;
189188

190-
impl Handler<Tick> for JobActor {
189+
impl Handler<Execute> for JobActor {
191190
type Return = ();
192191

193-
async fn handle(&mut self, _msg: Tick, _ctx: &mut Context<Self>) {
192+
async fn handle(&mut self, _msg: Execute, _ctx: &mut Context<Self>) {
194193
if self.stopping || !self.job.enabled {
195194
return;
196195
}

0 commit comments

Comments
 (0)