mirror of
https://github.com/acaloiaro/neoq
synced 2026-07-21 10:12:18 +00:00
Remove safety check for running too soon
This commit is contained in:
parent
f7da9f3903
commit
bcc39d1cd2
1 changed files with 8 additions and 8 deletions
|
|
@ -943,14 +943,14 @@ func (p *PgBackend) handleJob(ctx context.Context, jobID string) (err error) {
|
|||
ctx = jobs.WithJobContext(ctx, job)
|
||||
ctx = context.WithValue(ctx, txCtxVarKey, tx)
|
||||
|
||||
if job.RunAfter.Before(time.Now()) {
|
||||
p.logger.Error("Running a job too early.",
|
||||
slog.String("queue", job.Queue),
|
||||
slog.Int64("job_id", job.ID),
|
||||
slog.String("duration", (-time.Since(job.RunAfter)).String()))
|
||||
err = p.updateJob(ctx, fmt.Errorf("run to soon"))
|
||||
return
|
||||
}
|
||||
// if job.RunAfter.Before(time.Now()) {
|
||||
// p.logger.Error("Running a job too early.",
|
||||
// slog.String("queue", job.Queue),
|
||||
// slog.Int64("job_id", job.ID),
|
||||
// slog.String("duration", (-time.Since(job.RunAfter)).String()))
|
||||
// err = p.updateJob(ctx, fmt.Errorf("run to soon"))
|
||||
// return
|
||||
// }
|
||||
|
||||
if job.Deadline != nil && job.Deadline.Before(time.Now().UTC()) {
|
||||
err = jobs.ErrJobExceededDeadline
|
||||
|
|
|
|||
Loading…
Reference in a new issue