There could be a condition where jobs were added to a queue that is not longer being watched,
yet the jobs in those queues would continue appearing in the pending job list because
the query to get pending jobs did not filter by queues being watched.
The previous release attempted to fix an issue where, when LISTEN connections
drop an reconnect, some job announcements might be missed.
This fix reduces the number of connections required to do so.
When jobs are inserted into the 'neoq_jobs', the `announce_job` trigger announces the job to
listeners of the job's queue. However, if no workers are available to receive the announcement,
or the announcement is somehow lost, it meant those jobs were marooned on the queue.
This fix adds a periodic check for post-due pending jobs to ensure that a neoq restart is
not necessary to catch marooned, overdue jobs.
This goal of this change is to simplify the API. Handlers and queues
have a 1:1 mapping, so functions that receive both a `queue` and a
`handler` take two parameters when they could take only one.
- Add ConfigOption for logger configuration
- Extend Neoq interface with SetLogger()
- Remove error return value from Shutdown()
- Remove WithConfig from Neoq interface
- Make future job check interval configurable in MemBackend (fixes#11)
- Make interval of time for which jobs are dedicated a goroutine use a default in MemBackend (fixes#12)
- Make future job check interval configurable in PgBackend (fixes#18)
- Make interval of time for which jobs are dedicated a goroutine use a default in PgBackend (fixes#19)