You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, can't understand why the Redis key created by this EnqueueUniqueInByKey is not equal or greater than the secondsFromNow value, since this function is different from EnqueueUniqueByKey which doesn't have the secondsFromNow and only have 24h TTL
// EnqueueUniqueInByKey enqueues a job in the scheduled job queue that is unique on specified key for execution in secondsFromNow seconds. See EnqueueUnique for the semantics of unique jobs.
// Subsequent calls with same key will update arguments
func (e *Enqueuer) EnqueueUniqueInByKey(jobName string, secondsFromNow int64, args map[string]interface{}, keyMap map[string]interface{}) (*ScheduledJob, error) {
enqueue, job, err := e.uniqueJobHelper(jobName, args, keyMap)
if err != nil {
return nil, err
}
scheduledJob := &ScheduledJob{
RunAt: nowEpochSeconds() + secondsFromNow,
Job: job,
}
res, err := enqueue(&scheduledJob.RunAt)
if res == "ok" && err == nil {
return scheduledJob, nil
}
return nil, err
}
The text was updated successfully, but these errors were encountered:
kh411d
changed the title
EnqueueUniqueInByKey TTL not following secondsFromNow
EnqueueUniqueInByKey TTL not equal or greater than secondsFromNow
Oct 6, 2022
Hi, can't understand why the Redis key created by this
EnqueueUniqueInByKey
is not equal or greater than thesecondsFromNow
value, since this function is different fromEnqueueUniqueByKey
which doesn't have the secondsFromNow and only have 24h TTLThe text was updated successfully, but these errors were encountered: