File tree Expand file tree Collapse file tree
src/lib/server/job-executors Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ export async function product(job: Job<BullMQ.Build.Product>): Promise<unknown>
7676 job . log
7777 )
7878 } ) ;
79+ // rethrow so error makes it to HoneyComb
80+ throw e ;
7981 }
8082}
8183
Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ export async function build(job: Job<BullMQ.Polling.Build>): Promise<unknown> {
7171 } ;
7272 }
7373 } catch ( e ) {
74+ // don't await, in case error throws here
75+ getQueues ( ) . Polling . removeJobScheduler ( job . name ) ;
7476 job . log ( `${ e } ` ) ;
7577 await prisma . build . updateMany ( {
7678 where : { id : job . data . buildId } ,
@@ -84,6 +86,8 @@ export async function build(job: Job<BullMQ.Polling.Build>): Promise<unknown> {
8486 job . log
8587 )
8688 } ) ;
89+ // rethrow so error makes it to HoneyComb
90+ throw e ;
8791 }
8892}
8993
@@ -162,11 +166,15 @@ export async function release(job: Job<BullMQ.Polling.Release>): Promise<unknown
162166 } ;
163167 }
164168 } catch ( e ) {
169+ // don't await, in case error throws here
170+ getQueues ( ) . Polling . removeJobScheduler ( job . name ) ;
165171 job . log ( `${ e } ` ) ;
166172 await prisma . release . updateMany ( {
167173 where : { id : job . data . releaseId } ,
168174 data : { result : Build . Result . Failure , status : Release . Status . Completed }
169175 } ) ;
176+ // rethrow so error makes it to HoneyComb
177+ throw e ;
170178 }
171179}
172180
Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ export async function product(job: Job<BullMQ.Release.Product>): Promise<unknown
7171 job . log
7272 )
7373 } ) ;
74+ // rethrow so error makes it to HoneyComb
75+ throw e ;
7476 }
7577}
7678
You can’t perform that action at this time.
0 commit comments