mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +01:00
fix(be): checking error by nil before log it
This commit is contained in:
parent
c1c8a9ebf9
commit
ab098b8b82
@ -88,12 +88,15 @@ func (p *taskPool) run() {
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case record := <-p.logger:
|
case record := <-p.logger:
|
||||||
err, _ := record.task.store.CreateTaskOutput(db.TaskOutput{
|
_, err := record.task.store.CreateTaskOutput(db.TaskOutput{
|
||||||
TaskID: record.task.task.ID,
|
TaskID: record.task.task.ID,
|
||||||
Output: record.output,
|
Output: record.output,
|
||||||
Time: record.time,
|
Time: record.time,
|
||||||
})
|
})
|
||||||
log.Error(err)
|
|
||||||
|
if err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
}
|
||||||
case task := <-p.register:
|
case task := <-p.register:
|
||||||
p.queue = append(p.queue, task)
|
p.queue = append(p.queue, task)
|
||||||
log.Debug(task)
|
log.Debug(task)
|
||||||
|
Loading…
Reference in New Issue
Block a user