alias_attribute for delayed_job attributes

28 views
Skip to first unread message

Evgeny Rahman

unread,
Jun 18, 2013, 1:33:15 PM6/18/13
to delay...@googlegroups.com
Hi everyone!

I'm trying to use delayed_job with a database (Teradata) where both "queue" and "handler" are reserved names, and can't be used as column names in a table. 

I have the following code for the Delayed Job model -

class Delayed::Job < ActiveRecord::Base
  alias_attribute :handler, :dj_handler
  alias_attribute :queue, :dj_queue
end

but it does not seem to matter, as the application throws the error -

unknown attribute: queue


What's the right way to tell delayed_job that it should look at differently-named attributes for queue and handler?

Thanks,

Evgeny

Evgeny Rahman

unread,
Jun 24, 2013, 5:53:22 PM6/24/13
to delay...@googlegroups.com
For anyone interested, I solved this problem by placing the code in my original post in an initializer instead of in a model.
Reply all
Reply to author
Forward
0 new messages