Using CarrierWave with Resque

247 views
Skip to first unread message

gorman

unread,
Aug 28, 2010, 11:57:58 PM8/28/10
to carrierwave
Hey all,

I was curious if anyone is using CarrierWave with Resque for
background processing. I haven't been able to find any examples of
this, so any guidance would be appreciated :) Thanks!

-gorman

gorman

unread,
Aug 30, 2010, 4:41:38 PM8/30/10
to carrierwave
I'm primarily looking for how to halt the post-processing of uploads.
Maybe I'm overlooking it, but I haven't been able to find this in the
code. From there, it should be pretty straightforward. Thanks for any
help!

Jonas Nicklas

unread,
Aug 30, 2010, 5:19:33 PM8/30/10
to carri...@googlegroups.com
If you don't want your images to be processed after upload, simply
don't add a process callback and call whatever method you would have
called at your convenience.

Example:

class MyUploader < ...
# don't do this:
# process :resize => [200, 200]

# instead just call resize whenever you need to:
def processed_by_queue
resize(200, 200)
end
end

Does that make sense?

/Jonas

> --
> You received this message because you are subscribed to the Google Groups "carrierwave" group.
> To post to this group, send email to carri...@googlegroups.com.
> To unsubscribe from this group, send email to carrierwave...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/carrierwave?hl=en.
>
>

gorman

unread,
Aug 30, 2010, 9:04:21 PM8/30/10
to carrierwave
Ah right, that makes sense. My mind was stuck in Paperclip-land.
Thanks for the help :)
Reply all
Reply to author
Forward
Message has been deleted
0 new messages