mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 03:07:35 +00:00
Gracefully shutdown server (#3896)
This commit is contained in:
@@ -27,9 +27,9 @@ import (
|
||||
|
||||
// WithTaskStore returns a queue that is backed by the TaskStore. This
|
||||
// ensures the task Queue can be restored when the system starts.
|
||||
func WithTaskStore(q Queue, s store.Store) Queue {
|
||||
func WithTaskStore(ctx context.Context, q Queue, s store.Store) Queue {
|
||||
tasks, _ := s.TaskList()
|
||||
if err := q.PushAtOnce(context.Background(), tasks); err != nil {
|
||||
if err := q.PushAtOnce(ctx, tasks); err != nil {
|
||||
log.Error().Err(err).Msg("PushAtOnce failed")
|
||||
}
|
||||
return &persistentQueue{q, s}
|
||||
|
Reference in New Issue
Block a user