Skip to content

Commit

Permalink
No need to check for broadcast status
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed May 6, 2020
1 parent 12c2f0c commit 95921c4
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions dkron/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ type Job struct {
// Number of times to retry a job that failed an execution.
Retries uint `json:"retries"`

// running indicates that the Run method is still broadcasting
running bool

// Jobs that are dependent upon this one will be run after this job runs.
DependentJobs []string `json:"dependent_jobs"`

Expand Down Expand Up @@ -229,9 +226,6 @@ func (j *Job) Run() {

// Check if it's runnable
if j.isRunnable() {
j.running = true
defer func() { j.running = false }()

log.WithFields(logrus.Fields{
"job": j.Name,
"schedule": j.Schedule,
Expand Down Expand Up @@ -318,12 +312,6 @@ func (j *Job) isRunnable() bool {
}
}

if j.running {
log.WithField("job", j.Name).
Warning("job: Skipping execution because last execution still broadcasting, consider increasing schedule interval")
return false
}

return true
}

Expand Down

0 comments on commit 95921c4

Please sign in to comment.