mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-04 17:06:49 +00:00
Fixes for hanging jobs, more verbose ci output
This commit is contained in:
@ -16,7 +16,7 @@ var (
|
||||
func Start() {
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
q := &Queue{
|
||||
jobs: make(chan Job),
|
||||
jobs: make(chan Job, 10),
|
||||
ctx: ctx,
|
||||
cancel: cancel,
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ type Queue struct {
|
||||
jobs chan Job
|
||||
ctx context.Context
|
||||
cancel context.CancelFunc
|
||||
mu sync.Mutex
|
||||
}
|
||||
|
||||
// Job - holds logic to perform some operations during queue execution.
|
||||
@ -41,6 +42,8 @@ func (q *Queue) AddJobs(jobs []Job) {
|
||||
|
||||
// AddJob sends job to the channel.
|
||||
func (q *Queue) AddJob(job Job) {
|
||||
q.mu.Lock()
|
||||
defer q.mu.Unlock()
|
||||
q.jobs <- job
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user