diff --git a/periodic_enqueuer.go b/periodic_enqueuer.go index 9b7a996e..68e19ad5 100644 --- a/periodic_enqueuer.go +++ b/periodic_enqueuer.go @@ -137,7 +137,7 @@ func (pe *periodicEnqueuer) shouldEnqueue() bool { return true } - return lastEnqueue < (nowEpochSeconds() - int64(periodicEnqueuerSleep/time.Minute)) + return lastEnqueue < (nowEpochSeconds() - int64(periodicEnqueuerSleep/time.Second)) } func makeUniquePeriodicID(name, spec string, epoch int64) string { diff --git a/periodic_enqueuer_test.go b/periodic_enqueuer_test.go index e1c9d19b..ff80fe23 100644 --- a/periodic_enqueuer_test.go +++ b/periodic_enqueuer_test.go @@ -94,7 +94,7 @@ func TestPeriodicEnqueuer(t *testing.T) { assert.False(t, pe.shouldEnqueue()) - setNowEpochSecondsMock(1468359454 + int64(periodicEnqueuerSleep/time.Minute) + 10) + setNowEpochSecondsMock(1468359454 + int64(periodicEnqueuerSleep/time.Second) + 10) assert.True(t, pe.shouldEnqueue()) }