Add nginx exec

This commit is contained in:
Jamie Curnow committed 2022-07-15 14:26:12 +10:00
1 parent b8008606fd
commit 5b6dbaf43e
6 files changed
+101 -14

No files matched your search

-4
View File
@@ -2,7 +2,6 @@ package jobqueue
import (
"context"
"log"
"sync"
)
@@ -42,13 +41,10 @@ func (q *Queue) AddJobs(jobs []Job) {
// AddJob sends job to the channel.
func (q *Queue) AddJob(job Job) {
q.jobs <- job
log.Printf("New job %s added to queue", job.Name)
}
// Run performs job execution.
func (j Job) Run() error {
log.Printf("Job running: %s", j.Name)
err := j.Action()
if err != nil {
return err