Saving data correctly on queue connection sync vs redis or database #7561
-
I'm having an issue with saving an image asset to entries. I have a job that creates entries, a bit like this:
The get_image-method gets an image from an external URL, and saves it to disk as an asset.
Given that the queue connection is set to redis or database, the image_url-field occasionally gets properly set for one, or maybe two of three relevant entries, but for the most part it doesn't get added at all. If the queue connection is set to sync, it always works and image_url gets set properly. Is there some config I need to check for this to work? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I solved this by separating saving images and creating entries into two jobs, and then chaining those. |
Beta Was this translation helpful? Give feedback.
I solved this by separating saving images and creating entries into two jobs, and then chaining those.