Skip to content

Instantly share code, notes, and snippets.

@shemul
Created June 12, 2020 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shemul/4781afd7dcaf708bdb0d07aa5c299afc to your computer and use it in GitHub Desktop.
Save shemul/4781afd7dcaf708bdb0d07aa5c299afc to your computer and use it in GitHub Desktop.
package worker
import (
"github.com/RichardKnop/machinery/v1"
)
func StartWorker(taskserver *machinery.Server) error {
worker := taskserver.NewWorker("machinery_worker", 10)
if err := worker.Launch(); err != nil {
return err
}
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment