QueueClassic / queue_classic

Simple, efficient worker queue for Ruby & PostgreSQL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why #lock is not using `QC.table_name`

gmhawash opened this issue · comments

This has bit me a few times as we're switching schemas. All the methods in the queue.rb file are relying on QC.table_name except for the #lock method. The #lock method just references queue_classic_jobs. In our case, we keep all our queue entries in the public schema, and we set QC.table_name = 'public.queue_classic_jobs'. In some cases, the session's search_path is still pointing to a schema other than public and the #lock method does not find any entries to process.

Why is this method not using QC.tablename?

@gmhawash

FROM queue_classic_jobs
- this looks suspiciously like an oversight. There is no reason why it should not be using that method.