albrow / jobs

A persistent and flexible background jobs library for go.
MIT License
499 stars 47 forks source link

Use sets instead of sorted sets where appropriate #3

Open albrow opened 9 years ago

albrow commented 9 years ago

Every job has a status. Currently there is a sorted set for each status, where all jobs that have that status are stored. Technically only the "queued" set needs to have a score (the priority) since that allows higher-priority jobs to get picked up first. Using sets instead of sorted sets when possible should reduce memory usage.