lale-help / lale-help

A collaborative platform for volunteer refugee support.

Home Page:http://lale.help

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate Rollbar Error 56 - undefined class

dottorer opened this issue · comments

the problem clearly are those complex objects which gets passed into sidekiq and then the deserialization fails on wrong nesting of class constants.

the implementation does not follow the recommendation from sidekiq:
https://github.com/mperham/sidekiq/wiki/Delayed-extensions#actionmailer
It is recommended to avoid passing an object instance to mailer methods. Instead, pass an object id and then re-instantiate the object in the mailer method

there are not to many places where the delay is used on Mailer classes, could be switched easily to do the right thing.

@mkristian That would be an excellent solution. We were never happy with the short term fix of just using delay and serializing the entire object. Let me know if you can fix this for us...

I can fix it easily but code becomes less object-oriented like
TaskMailer.delay.task_reminder(task, user, token) will become TaskMailer.delay.task_reminder(task.id, user.id, token.code) so sidekiq needs to serialize only primitives.

probably OK as you want all emails sent out asynchronously

Works for me...