OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.41k stars 2.39k forks source link

[Deployment plan] execution indicator #11209

Open xperiandri opened 2 years ago

xperiandri commented 2 years ago

Is your feature request related to a problem? Please describe.

When your site is big and the plan is big the file is prepared for some time. However, you have no clue that it happens indeed. So that you can press the execute button several times.

Describe the solution you'd like

At least notify and block the button if the deployment plan execution started successfully. At most display the progress indicator in addition.

hishamco commented 2 years ago

Even if we disable the button, the user will have no idea what's going on. The progress indicator may be a very good option, we can increase the progress on each step in the recipe file

IMHO it's good feature for enhancement, so let us hear the others feedback

jtkech commented 2 years ago

As described a little at the end of this comment https://github.com/OrchardCMS/OrchardCore/issues/11152#issuecomment-1043479102 we would need to trigger a kind of background job without delaying the request reponse so that the job can update some progress data in an IDistributedCache (MemoryCache by default) that local ajax calls request on.

We did such a custom implementation by using a RazorPage, the ajax calls targetting RazorPage handlers, we also used an IDistributedLock (local lock by default) so that a given job (here a deployment) can't run concurrently, when I will have more time I may suggest PR(s) for this kind of helpers.

Skrypt commented 2 years ago

I think @deanmarcussen also was working on a Jobs Queue.

jtkech commented 2 years ago

Yes I saw his great demo, here it is about e.g. to trigger a "background" job immediately on an mvc action