ostark / craft-async-queue

Async Queue Handler for Craft 3 and 4
MIT License
93 stars 7 forks source link

Command Line showing incorrect path #70

Closed iamtompickering closed 2 months ago

iamtompickering commented 7 months ago

For some strange reason, the path to the root directory is incorrect in the Command Line of your plugins settings.

Is there any way to override this like you can with the PHP_BINARY .env var?

ostark commented 7 months ago

Yes, it's documented: https://github.com/ostark/craft-async-queue?tab=readme-ov-file#configuration-optional

iamtompickering commented 7 months ago

@ostark thanks for this but I don't think the part I am referring to is documented.

I can see that you can override the PHP_BINARY e.g. usr/local/php81/bin/php

But what about the path that comes after it e.g. /home/customer/www/website.com/craft

For some reason, that part of the command is incorrect for my site, so it would be good to be able to override that part of the command as well. Let me know if I am missing something here and if it is actually possible?

ostark commented 7 months ago

Ah, I see. There is an Event that allows modification of the whole command from outside. Since this problem is unique to this website/environment only, I'd do a hacky string replace there.

https://github.com/ostark/craft-async-queue/tree/master?tab=readme-ov-file#events

You can put the event listener in your config/app.php.