how to store Tmail object in resque

Go To StackoverFlow.com

0

I know we cant keep objects directly in redis queue. I converted it to string using Marsal.dump(tmail_object) while fetching i am using Marshal.load(tmail_object)

but the object is changing i guess. I get empty email when i send email using that object.

What is the best way to store tmail object in redis queue. I am actually sending email using scheduled job used resque scheduler.

please advice.

2012-04-04 06:32
by Sharath B. Patel


0

The better way is pass params needed to generate your Tmail object in resque and generate this Tmail object in your job.

You limit your size of data save on your redis and save time to generate this tmail object before push it on your resque job.

2012-04-04 08:03
by shingara
Ads