golang-queue / queue Goto Github PK
View Code? Open in Web Editor NEWQueue is a Golang library for spawning and managing a Goroutine pool
License: MIT License
Queue is a Golang library for spawning and managing a Goroutine pool
License: MIT License
Nice project - I use nats and it seems this can use golang channels and NATS.
How easy do you think adding repeating times tasks would be ?
there is another NATS Job runner here btw: https://github.com/choria-io/asyncjobs however its not agnostic like queue is.
Hi,
Doing a "go get" (install) on this repository is throwing build errors on "!errors.Is(...)" - is it my go version?
I've got an older version of Go: go.1.12.1 (win/amd64) - is "errors.Is()" more recent?
I'm relatively new to Go, so please point me in the right direction if I'm being silly...
Thanks.
EDIT: Oh my... I just found out that go1.13 added error.Is() LOL!!!
Any sage advice on a workaround? I'm stuck with 1.12 for now. I'll try to edit the local source in the meantime.
// define the queue
q := queue.NewPool(
0,
queue.WithWorker(w),
)
We create the local queue using a buffer channel by default, the queues should be clear before restarting the service.
WARNING: DATA RACE
Read at 0x00c000218c70 by goroutine 1770:
github.com/golang-queue/queue.(*Ring).Request()
/home/github-runner/actions-runner/_work/vendor/github.com/golang-queue/queue/ring.go:78 +0xa4
github.com/golang-queue/queue.(*Queue).start.func1()
/home/github-runner/actions-runner/_work/vendor/github.com/golang-queue/queue/queue.go:301 +0x77
github.com/golang-queue/queue.(*routineGroup).Run.func1()
/home/github-runner/actions-runner/_work/vendor/github.com/golang-queue/queue/thread.go:18 +0x73
previous v0.1.3 didn't
notice runner that queue has been shut down.
hey @appleboy
this looks like its highly relevant https://github.com/stealthrocket/coroutine/
It can rehydrate state between processes too !
github.com/golang-queue/redisdb. 中好像只有看到 pub sub 相關的 function , 請問要如何使用 redis streams as backend , 謝謝.
Provide the following solution only for the simple queues.
type TaskFunc func(context.Context) error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.