File tree Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,21 @@ export async function execute (job: Job) {
28
28
scenario = new ProjectScenario ( )
29
29
}
30
30
31
- // Setup RUNBOX
32
- await scenario . setup ( currentJobDir , job )
33
-
34
- // Run worker
35
- await scenario . run ( currentJobDir , job )
36
-
37
- // Get result
38
- const result = await scenario . result ( currentJobDir , job )
39
-
40
- rm ( '-rf' , currentJobDir )
41
-
42
- return result
31
+ try {
32
+ // Setup RUNBOX
33
+ await scenario . setup ( currentJobDir , job )
34
+
35
+ // Run worker
36
+ await scenario . run ( currentJobDir , job )
37
+
38
+ // Get result
39
+ const result = await scenario . result ( currentJobDir , job )
40
+
41
+ rm ( '-rf' , currentJobDir )
42
+ return result
43
+
44
+ } catch ( err ) {
45
+ rm ( '-rf' , currentJobDir )
46
+ throw err
47
+ }
43
48
}
You can’t perform that action at this time.
0 commit comments