Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Oct 12, 2019
1 parent 80c9e8d commit 8edb889
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/task/queue_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func (c *ChannelQueue) Push(task *models.Task) error {
return nil
}

// Stop stop the queue
func (c *ChannelQueue) Stop() {
close(c.queue)
}
1 change: 1 addition & 0 deletions modules/task/queue_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ func (r *RedisQueue) Push(task *models.Task) error {
return r.client.RPush(r.queueName, bs).Err()
}

// Stop stop the queue
func (r *RedisQueue) Stop() {
r.closeChan <- true
}

0 comments on commit 8edb889

Please sign in to comment.