github.com/jacobsoderblom/buffalo@v0.11.0/worker/job.go (about) 1 package worker 2 3 import "encoding/json" 4 5 // Args are the arguments passed into a job 6 type Args map[string]interface{} 7 8 func (a Args) String() string { 9 b, _ := json.Marshal(a) 10 return string(b) 11 } 12 13 // Job to be processed by a Worker 14 type Job struct { 15 // Queue the job should be placed into 16 Queue string 17 // Args that will be passed to the Handler when run 18 Args Args 19 // Handler that will be run by the worker 20 Handler string 21 } 22 23 func (j Job) String() string { 24 b, _ := json.Marshal(j) 25 return string(b) 26 }