Closed bourg-ismael closed 8 years ago
I fixed it like that :
@email.attachments.each {|t| ObjectSpace.undefine_finalizer(t.tempfile)}
# Griddler Email to hash for Sidekiq
email = {
attachments: @email.attachments.map {|att| {
type: att.content_type,
name: att.original_filename.include?('=?UTF-8?') ? "unknown#{Rack::Mime::MIME_TYPES.invert[att.content_type]}" : att.original_filename,
path: att.tempfile.path
}},
raw_text: @email.raw_text,
raw_html: @email.raw_html,
from: @email.from,
subject: @email.subject,
to: @email.to,
cc: @email.cc
}
MessagesInboundWorker.perform_async email
Persisting my Tempfiles, then send it to my Worker
Did you have to redefine the finalizer in your worker to ensure the tempfiles eventually get GC'd?
Hi,
Is that possible to use Sidekiq to perform as Griddler Processor ? Currently Griddler return a Griddler Object that I can't send to Sidekiq, and I need it to upload attachments to S3 Bucket.
Do you have any way to use Griddler with Sidekiq ?
Thanks