File tree 3 files changed +13
-2
lines changed
apps/webapp/app/v3/services
internal-packages/testcontainers/src 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import { z } from "zod";
25
25
26
26
const PROCESSING_BATCH_SIZE = 50 ;
27
27
const ASYNC_BATCH_PROCESS_SIZE_THRESHOLD = 20 ;
28
+ const MAX_ATTEMPTS = 10 ;
28
29
29
30
export const BatchProcessingStrategy = z . enum ( [ "sequential" , "parallel" ] ) ;
30
31
export type BatchProcessingStrategy = z . infer < typeof BatchProcessingStrategy > ;
@@ -547,6 +548,16 @@ export class BatchTriggerV2Service extends BaseService {
547
548
548
549
const $attemptCount = options . attemptCount + 1 ;
549
550
551
+ // Add early return if max attempts reached
552
+ if ( $attemptCount > MAX_ATTEMPTS ) {
553
+ logger . error ( "[BatchTriggerV2][processBatchTaskRun] Max attempts reached" , {
554
+ options,
555
+ attemptCount : $attemptCount ,
556
+ } ) ;
557
+ // You might want to update the batch status to failed here
558
+ return ;
559
+ }
560
+
550
561
const batch = await this . _prisma . batchTaskRun . findFirst ( {
551
562
where : { id : options . batchId } ,
552
563
include : {
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ services:
61
61
- 6379:6379
62
62
63
63
electric :
64
- image : electricsql/electric:0.8.1
64
+ image : electricsql/electric:0.9.4
65
65
restart : always
66
66
environment :
67
67
DATABASE_URL : postgresql://postgres:postgres@database:5432/postgres?sslmode=disable
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export async function createElectricContainer(
55
55
network . getName ( )
56
56
) } :5432/${ postgresContainer . getDatabase ( ) } ?sslmode=disable`;
57
57
58
- const container = await new GenericContainer ( "electricsql/electric:0.8.1 " )
58
+ const container = await new GenericContainer ( "electricsql/electric:0.9.4 " )
59
59
. withExposedPorts ( 3000 )
60
60
. withNetwork ( network )
61
61
. withEnvironment ( {
You can’t perform that action at this time.
0 commit comments