- Notifications
You must be signed in to change notification settings - Fork0
An interoperable Golang port of the Ruby Que queuing library for PostgreSQL
License
talon-one/que-go
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Que-go is a fully interoperable Golang port ofChris Hanks'Ruby Quequeuing library for PostgreSQL. Que uses PostgreSQL's advisory locksfor speed and reliability.
Because que-go is an interoperable port of Que, you can enqueue jobs in Ruby(i.e. from a Rails app) and write your workers in Go. Or if you have a limitedset of jobs that you want to write in Go, you can leave most of your workers inRuby and just add a few Go workers on a different queue name. Or you can justwrite everything in Go :)
This package uses thepgx Go PostgreSQL driver rather than the morepopularpq. Because Que uses session-level advisory locks, we have to holdthe same connection throughout the process of getting a job, working it,deleting it, and removing the lock.
Pq and the built-in database/sql interfaces do not offer this functionality, sowe'd have to implement our own connection pool. Fortunately, pgx already has aperfectly usable one built for us. Even better, it offers better performancethan pq due largely to its use of binary encoding.
Please see thegodocs for more info and examples.
About
An interoperable Golang port of the Ruby Que queuing library for PostgreSQL
Resources
License
Stars
Watchers
Forks
Packages0
Languages
- Go100.0%