Composer Activity Lock
Created 6 years ago by ryanthompsonSo the addons module needs some love. The biggest issue is that composer can take a while to operate and PHP times out without a lot of extra configuration. So my thoughts are:
-
) When installing the modal will fire the CLI activity via a controller as it does now, but we will not wait for the command to finish. Instead we will start the command and kill the request.
-
) Composer will need to be adjusted to have pre/post commands to write a temporary lock file while it's working (publicly accessible)
-
) The modal that shows progress will send a poll request to the lock file and basically if its there we are still working (maybe we could write a log to it while working to read via JS) and if it 404's we're done and can allow page refresh / reload like normal.
This should let us use composer, even though it's slow typically, without worrying about timeouts.
I will also be adding the composer require type script to the view and working on the processing / caching of the composer lists so it's not so slow AS well as adding ability to require multiple at a time from the table.
@emergingdzns Yes the multiple install will use the table checkbox / options type UI we have now.
I think this is a good idea. However, what about rather than having a single download, install button on each addon row, instead have a checkbox on each row. The user checks one or more rows to install and then clicks a single button to install. That way it's not running the full composer function for each but doing a single install with all of the checked items at once? Even better would be to make the action a drop down so that users can disable/uninstall multiple at once too.