mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
If no task if found don't print error (#130)
This commit is contained in:
committed by
Pedro Nasser
parent
52cab30056
commit
970412ba88
@@ -34,7 +34,7 @@ func getTask(url string) (*models.Task, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if task.ID == "" {
|
if task.ID == "" {
|
||||||
return nil, errors.New("Invalid Task: ID empty")
|
return nil, nil
|
||||||
}
|
}
|
||||||
return &task, nil
|
return &task, nil
|
||||||
}
|
}
|
||||||
@@ -124,6 +124,10 @@ func startAsyncRunners(ctx context.Context, wg *sync.WaitGroup, i int, url strin
|
|||||||
time.Sleep(1 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if task == nil {
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
|
continue
|
||||||
|
}
|
||||||
log.Info("Picked up task:", task.ID)
|
log.Info("Picked up task:", task.ID)
|
||||||
|
|
||||||
log.Info("Running task:", task.ID)
|
log.Info("Running task:", task.ID)
|
||||||
|
|||||||
Reference in New Issue
Block a user