lardawge/carrierwave_backgrounder

Recreate_versions doesn't work even with process_file_upload = true

Closed this issue · 7 comments

I've got this setup:

mount_uploader :file, AudioFileUploader
store_in_background :file

But if I try to recreate any versions:

af = AudioFile.first
af.process_file_upload = true
af.recreate_versions!(:peak_data_large)
af.save!

This executes quickly and doesn't enqueue a job.

@TrevorHinesley Any solution to this issue?

Still not working here as well

@samul5 I am looking into this. To confirm, are you using store_in_background or process_in_background?

I just tested this and am unable to reproduce the issue.

  • Rails 7.0.6
  • CW 3.0.2
  • carrierwave-aws 1.6.0
  • CWB 0.4.3

I am using process_in_background.
I upload and save the object which stores the file and creates a background job. At this point, no versions have been created.
I then call u.avatar.recreate_versions! and the versions get created.

There shouldn't be any reason that CWB would interfere with version recreation. It is not hooked into that code within CW.
It should also not be necessary to set process_<column_name> to do this. The only time this is useful is when you are assigning a new asset to the column and want to bypass CWB.

NOTE: The difference here is that I am using carrierwave-aws. I am not sure if any of you are using fog and perhaps that is the issue. If you can post a sample app recreating the problem you are seeing or point me to some steps to recreate, I will be more than happy to see if I can solve this.

Closing this until someone chimes in. 0.4.3 has been released.
1.0-beta is almost complete and in a branch of its own. It has a full rails app for real testing instead of using stubs.
I have store_in_background tested and working properly. There are some changes and removal of some supported backends. Read the README for clarity.

Hey @lardawge, sorry for the delay of my reply..
I've been using process_in_background, that is correct.

I had a situation where I had an upload triggered, but because of another problem the job wasn't created. That way, I only had the original uploaded to the file store.
After that I wanted to recreated the versions manually with recreate_versions!.
All I get as a callback, is this:

=> [:store_versions!]

By trying to save the file, nothing happened...

Am I using it wrong or am I missing something? Thanks!

@samul5 Check out version 1.0.0.beta.2 which is currently master.
The worker for process_in_background does exactly that. There are tests that also support it.
Double-check your setup against README in master. Lots of new info. If you still have issues, open a ticket with all of your setup info and I will have a look.