File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
src/routes/(console)/project-[region]-[project]
functions/function-[function] Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 14
14
export let show = false ;
15
15
export let selectedDeployment: Models .Deployment = null ;
16
16
export let redirect = false ;
17
+
17
18
let error: string ;
18
19
19
20
async function redeploy() {
26
27
selectedDeployment ?.buildId || undefined
27
28
);
28
29
29
- trackEvent (Submit .FunctionRedeploy );
30
+ await Promise .all ([
31
+ invalidate (Dependencies .FUNCTION ),
32
+ invalidate (Dependencies .DEPLOYMENTS )
33
+ ]);
30
34
31
- invalidate (Dependencies .FUNCTION );
32
- invalidate (Dependencies .DEPLOYMENTS );
33
35
show = false ;
34
36
addNotification ({
35
37
type: ' success' ,
36
38
message: ` Redeploying ${$func .name } `
37
39
});
40
+
41
+ trackEvent (Submit .FunctionRedeploy );
38
42
if (redirect ) {
39
43
goto (
40
44
` ${base }/project-${page .params .region }-${page .params .project }/functions/function-${$func .$id }/deployments/deployment-${deployment .$id } `
Original file line number Diff line number Diff line change 14
14
export let selectedDeploymentId: string ;
15
15
export let site: Models .Site ;
16
16
export let redirect = false ;
17
+
17
18
let error: string ;
18
19
19
20
async function redeploy() {
22
23
.forProject (page .params .region , page .params .project )
23
24
.sites .createDuplicateDeployment (site .$id , selectedDeploymentId );
24
25
25
- trackEvent (Submit .SiteRedeploy );
26
- await invalidate (Dependencies .SITE );
27
- await invalidate (Dependencies .DEPLOYMENTS );
26
+ await Promise .all ([
27
+ invalidate (Dependencies .SITE ),
28
+ invalidate (Dependencies .DEPLOYMENTS )
29
+ ]);
28
30
show = false ;
29
31
addNotification ({
30
32
type: ' success' ,
31
33
message: ` Redeploying ${site .name } `
32
34
});
35
+ trackEvent (Submit .SiteRedeploy );
33
36
if (redirect ) {
34
37
await goto (
35
38
` ${base }/project-${page .params .region }-${page .params .project }/sites/site-${site .$id }/deployments/deployment-${deployment .$id } `
You can’t perform that action at this time.
0 commit comments