Rename (*rdb).push to enqueue

This commit is contained in:
Ken Hibino
2019-11-25 19:58:24 -08:00
parent 737de898eb
commit faa9b6ee22
3 changed files with 8 additions and 7 deletions

View File

@@ -37,7 +37,7 @@ func (c *Client) Process(task *Task, executeAt time.Time) error {
// enqueue pushes a given task to the specified queue.
func (c *Client) enqueue(msg *taskMessage, executeAt time.Time) error {
if time.Now().After(executeAt) {
return c.rdb.push(msg)
return c.rdb.enqueue(msg)
}
return c.rdb.zadd(scheduled, float64(executeAt.Unix()), msg)
}