DEV Community

Discussion on: Prevent ActiveStorage to kill your Rails app

Collapse
 
zimski profile image
CHADDA Chakib

Hey !
I think the AnalyzeJob is called when the upload is done. I should dive on the rails code to be sure.

Meanwhile, The meta data is needed to know if it’s an image, pdf or a regular file.
This data is also needed to choose the right processor to compress or resize.
So this should be done as soon as possible ( technically just after the upload is done )

Collapse
 
alecrust profile image
Alec Rust

I believe AnalyzeJob for the variant does get queued when processed is called, not sure how quickly it occurs though. Maybe calling analyze after processed in the job would be wise.