[Awesome Go] Use goworker to run background worker
goworker is a Resque-compatible, Go-based background worker that runs 10 to 100,000* times faster than Ruby-based workers. It allows you to push jobs into a queue using an expressive language like Ruby while harnessing the efficiency and concurrency of Go to minimize job latency and cost.
goworker workers can run alongside Ruby Resque clients so that you can keep all but your most resource-intensive jobs in Ruby.
goworker - https://www.goworker.org/
The classic way to install
Remember to repalce
col-goworker-example with your prefer folder.
goworker worker functions receive the queue they are serving and a slice of interfaces. To use them as parameters to other functions, use Go type assertions to convert them into usable types.
// Expecting (int, string, float64)
See Getting Started - https://github.com/benmanns/goworker#getting-started to learn more.
go get -u github.com/benmanns/goworker
github.com/youtube/vitess has moved to
vitess.io/vitess, but the version(v0.1.3) on goworker · pkg.go.dev - https://pkg.go.dev/github.com/benmanns/goworker still import
move vitess.io · benmanns/[email protected] · GitHub - https://github.com/benmanns/goworker/commit/7dd3e9da301700bfb7f463f36873cd3ec5217d67
To get the latest version, you can also use branch
master such as:
go get -u github.com/benmanns/[email protected]
git - How to point Go module dependency in go.mod to a latest commit in a repo? - Stack Overflow - https://stackoverflow.com/questions/53682247/how-to-point-go-module-dependency-in-go-mod-to-a-latest-commit-in-a-repo
 GitHub - benmanns/goworker: goworker is a Go-based background worker that runs 10 to 100,000* times faster than Ruby-based workers. - https://github.com/benmanns/goworker
 goworker · pkg.go.dev - https://pkg.go.dev/github.com/benmanns/goworker
 goworker - https://www.goworker.org/
 GitHub - resque/resque: Resque is a Redis-backed Ruby library for creating background jobs, placing them on multiple queues, and processing them later. - https://github.com/resque/resque
 Resque: a job queue - http://resque.github.io/
 GitHub - vitessio/vitess: Vitess is a database clustering system for horizontal scaling of MySQL. - https://github.com/vitessio/vitess