I would like to build an application, where a client can decide to "go live" himself. When clicking on a button I would like to start the four needed API calls for Forge:
Create Site
Install GIT Repository
Change ENV file
Deploy Application
I will do these calls with a Forge API SDK package. That is not my probem.
Actually I don't have a good idea how to schedulde these calls? I know that steps 1 and 2 can tale 30 seconds up to over 3 minutes till they are finished.
So for example step 1 gives me back the SiteID in Forge, but the status will be "installing". How can I make somekind of Job that checks if this status is not "installing" anymore and then starts the next API call for step 2?
Home someone could give a some hints how to deal with that?
field. Once it's created and repository is installed you can then update the env file and deploy the app. Might be a delay of up to a couple minutes but does that really matter for the deployment time?
Also I'd recommend having the polling method error out after an hour or so, just so you don't use up Forge's traffic ;)
You could do that many different ways, store a field in the db, put a key in a never expiring cache, store it in a file, whatever you see as fit. Then in your kernel when you're defining the scheduling for your job just have a check before it's defined if the site has been created.