mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-15 17:13:46 +01:00
Pass down context.Context (#371)
* pass context down to remote clients * make tests work * add ctx to Refresh() and use it * bitbucketserver * code format * plugin interface: add todo context * solve todo * RM TODO by using context.WithTimeout * refactor & fix * Apply suggestions from code review Co-authored-by: Anbraten <anton@ju60.de> * go fmt * Update server/remote/coding/coding.go Co-authored-by: Anbraten <anton@ju60.de> Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
@@ -134,7 +134,7 @@ type Queue interface {
|
||||
// Push pushes a task to the tail of this queue.
|
||||
Push(c context.Context, task *Task) error
|
||||
|
||||
// Push pushes a task to the tail of this queue.
|
||||
// PushAtOnce pushes a task to the tail of this queue.
|
||||
PushAtOnce(c context.Context, tasks []*Task) error
|
||||
|
||||
// Poll retrieves and removes a task head of this queue.
|
||||
@@ -149,13 +149,13 @@ type Queue interface {
|
||||
// Error signals the task is complete with errors.
|
||||
Error(c context.Context, id string, err error) error
|
||||
|
||||
// Error signals the task is complete with errors.
|
||||
// ErrorAtOnce signals the task is complete with errors.
|
||||
ErrorAtOnce(c context.Context, id []string, err error) error
|
||||
|
||||
// Evict removes a pending task from the queue.
|
||||
Evict(c context.Context, id string) error
|
||||
|
||||
// Evict removes a pending task from the queue.
|
||||
// EvictAtOnce removes a pending task from the queue.
|
||||
EvictAtOnce(c context.Context, id []string) error
|
||||
|
||||
// Wait waits until the task is complete.
|
||||
@@ -164,9 +164,9 @@ type Queue interface {
|
||||
// Info returns internal queue information.
|
||||
Info(c context.Context) InfoT
|
||||
|
||||
// Stops the queue from handing out new work items in Poll
|
||||
// Pause stops the queue from handing out new work items in Poll
|
||||
Pause()
|
||||
|
||||
// Starts the queue again, Poll returns new items
|
||||
// Resume starts the queue again, Poll returns new items
|
||||
Resume()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user