Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golang API for creating queue and jobs? #1

Closed
ocrumbs opened this issue Sep 16, 2013 · 5 comments
Closed

Golang API for creating queue and jobs? #1

ocrumbs opened this issue Sep 16, 2013 · 5 comments

Comments

@ocrumbs
Copy link

ocrumbs commented Sep 16, 2013

I dont want to use cli or redis or ruby, just Golang. Is there a doc for just Golang implementation? Creating queues and jobs in Golang?

Thanks

@benmanns
Copy link
Owner

There is not at the moment. In the meantime, you can use redis-cli or insert jobs manually with redigo.

redis-cli RPUSH resque:queue:YOURQUEUE '{"class":"YOURCLASS","args":[YOURARGS]}'
conn.Send("RPUSH", fmt.Sprintf("resque:queue:%s", queue), YOURJSON)

Do you have any ideas on how the enqueueing API should be designed? Maybe something like

goworker.Enqueue(queue string, class string, args []interface{})

And goworker would automatically JSON-encode the args?

@ocrumbs
Copy link
Author

ocrumbs commented Sep 16, 2013

I see, it uses redis from within. I dont use redis. Its quite different from what I assumed. Thanks anyways.

@ocrumbs ocrumbs closed this as completed Sep 16, 2013
@oliamb
Copy link

oliamb commented Dec 19, 2013

I think this is the good API. I'm trying to implement it on my fork. Just having a design issue with the pool: it is passed to each worker and is inaccessible globally (not bad, of course).

What do you think is the right way to access it in the goworker.Enqueue scope?

@akshayrawat
Copy link

+1. Enqueuing jobs would be awesome.

@wricardo
Copy link

+1 to enqueueing jobs

argon pushed a commit to dicefm/goworker that referenced this issue Jun 23, 2016
mingan pushed a commit to EnerfisTeam/goworker that referenced this issue Oct 18, 2017
Validate connections from pool when using Sentinel
xescugc referenced this issue in cycloidio/goworker Jun 8, 2021
CHANGELOG: Stareted the CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants