Refactor async runner and its reference and add unit tests

This commit is contained in:
Seif Lotfy
2016-09-30 18:21:34 +02:00
parent 067100bf9c
commit d8801d5be7
4 changed files with 231 additions and 60 deletions

View File

@@ -131,6 +131,7 @@ func (mq *MemoryMQ) Push(job *models.Task) (*models.Task, error) {
// Push the work onto the queue.
return mq.pushForce(job)
}
func (mq *MemoryMQ) pushTimeout(job *models.Task) error {
ji := &TaskItem{