aboutsummaryrefslogtreecommitdiffstats
path: root/worker/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/worker.go')
-rw-r--r--worker/worker.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/worker/worker.go b/worker/worker.go
index 2af892c4..bef5b727 100644
--- a/worker/worker.go
+++ b/worker/worker.go
@@ -9,12 +9,12 @@ import (
)
// Guesses the appropriate worker type based on the given source string
-func NewWorker(source string) (*types.Worker, error) {
+func NewWorker(source string, name string) (*types.Worker, error) {
u, err := url.Parse(source)
if err != nil {
return nil, err
}
- worker := types.NewWorker()
+ worker := types.NewWorker(name)
scheme := u.Scheme
if strings.ContainsRune(scheme, '+') {
scheme = scheme[:strings.IndexRune(scheme, '+')]