开发者

Getting PG Error hard to debug when using delayed_job on heroku

I am trying to use heroku and appear to be getting a Postgres error but don't have enough information to know what to fix.

The error is below,开发者_如何学编程 and it looks like it is trying to run delayed_job:

> PGError: ERROR:  value too long for
> type character varying(255) : UPDATE
> "delayed_jobs" SET "updated_at" =
> '2010-09-12 01:06:59.354515', "last_e
> rror" = E'undefined method `subject''
> for #<YAML::Object:0x2b19faeca308>

Here is how I invoke it from a cron.rake:

    Delayed::Job.enqueue SomeMailJob.new(contact,contact_email)

SomeMailJob is defined through this file:

 class SomeMailJob < Struct.new(:contact, :contact_email) 
   def perform
     OutboundMailer.deliver_campaign_email(contact,contact_email)
   end
 end

It "looks" like the database for delayed_jobs is trying to be updated with something funky but I have no idea what that could be.....


The postgres error is occurring when the delayed job worker process tries to store the result of running the job (which was a separate error, btw).

Check your delayed_jobs table, specifically the last_error column. It should be a text column but it looks like yours is a string.


Looks like the underlying error is from calling "subject" on an object that doesn't have that method defined.


Seems like you are trying to enter a value, which has more than 255 chars in to a column which has the max chars 255.

cheers

sameera

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜