Not All QC functions loaded after resetting DB
alkrauss48 opened this issue · 4 comments
I have installed v3.0.0 of queue_classic and see the proper migrations in my migrations folder (so I see that QC::Setup.create
is called), but when I reset my db through rake db:reset
, I get the following errors when I try to start a worker with bundle exec rake qc:work
:
rake aborted!
PG::UndefinedFunction: ERROR: function lock_head(unknown, unknown) does not exist
LINE 1: SELECT * FROM lock_head($1, $2)
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Tasks: TOP => qc:work
(See full trace by running task with --trace)
However, this problem is fixed if I run bundle exec rake qc:update
, which results in the following feedback:
NOTICE: column created_at already exists in queue_classic_jobs.
NOTICE: column locked_by already exists in queue_classic_jobs.
NOTICE: function lock_head(pg_catalog.varchar) does not exist, skipping
NOTICE: function lock_head(pg_catalog.varchar,pg_catalog.int4) does not exist, skipping
NOTICE: function queue_classic_notify() does not exist, skipping
And afterwards, if I start a worker again, everything runs flawlessly. I don't think I have any strange setup, and seeing as how this issue is solvable rather easily, it's not a big deal. But the issue is here just in case!
hey @alkrauss48, thanks for reporting this.
First thing that comes to mind, and I might be wrong here, but do you have a schema.rb
or a structure.sql
in your project? I guess that a schema.rb
might not support Postgres functions...but this is a total guess here. If that's the case, it might be worth adding a note about this in the README.
@alkrauss48: do you still have the issue or you fixed it? Closing for now, feel free to re-open.
Sorry, that was rude of me not to respond. I've been on a different project for a bit, so I haven't been messing with ruby much lately. I believe I had a schema.rb
, but when I get back to playing with it, I'll hop back on here if I have any more issues.
Thanks!
No worry! Let us know when you're back on it if you face a problem.