Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a redis queue for [php please assets:generate-presets] #480

Closed
andrew-ireland opened this issue Feb 28, 2021 · 3 comments · Fixed by statamic/cms#3490
Closed

Using a redis queue for [php please assets:generate-presets] #480

andrew-ireland opened this issue Feb 28, 2021 · 3 comments · Fixed by statamic/cms#3490

Comments

@andrew-ireland
Copy link

I'm currently testing out/learning the ins and outs of redis/horizon.

I've got Horizon up and running on my production server, and am using php please assets:generate-presets & php please responsive:generate on deploy (in Forge). When I check Horizon it seems like the spatie/responsive-images tasks are being sent to the queue, and that's working as expected 🚀. When I run php please assets:generate-presets though, these Glide jobs are sent to the queue at all.

I have the following set in my .env
CACHE_DRIVER=redis # file default
QUEUE_CONNECTION=redis # sync default
SESSION_DRIVER=redis # file default

I may be missing something... but it seems like genereate-presets doesn't work with queues in V3. For sites with a lot of images it would be really handy if it did. I could be wrong, but based on other discussions I've seen I'm pretty sure this did work with queues in v2?

@andrew-ireland andrew-ireland changed the title Using a redis queue for php please assets:generate-presets Using a redis queue for [php please assets:generate-presets] Feb 28, 2021
@jasonvarga
Copy link
Member

The command itself doesn't queue. When you upload new assets, presets will be generated, and this happens through the queue.

The same is true in v2 in both cases.

However, we could make the command queueable. 👍

@andrew-ireland
Copy link
Author

Being able to queue this command in production environments would be great. When not using Spatie's responsive images I tend to generate a lot of presets. No issues uploading them, but when generating a lot of presets the production server I've found it pretty resource intensive (I'm using a relatively low powered server).

@robdekort
Copy link

Oh yeah, it would be super nice if the command was queueable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants