File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,5 @@ docker buildx build \
17
17
-f ./Dockerfile \
18
18
.
19
19
20
- echo " seadfeng/${APP} :${VERSION} "
21
- echo " seadfeng/${APP} :latest"
20
+ echo " seadfeng/playwright- ${APP} :${VERSION} "
21
+ echo " seadfeng/playwright- ${APP} :latest"
Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ class BrowserManager {
66
66
retryDelay : number = 1000 ,
67
67
) : Promise < string | null > {
68
68
const processedBrowsers = new Set < string > ( ) ;
69
- let browser : string | null ;
70
69
for ( let i = 0 ; i < maxRetries ; i ++ ) {
71
70
const browserId = await redis . lpop ( BROWSER_QUEUE ) ;
72
71
if ( ! browserId ) {
@@ -87,7 +86,7 @@ class BrowserManager {
87
86
] ) ;
88
87
89
88
const isAlive =
90
- lastHeartbeat && Date . now ( ) - parseInt ( lastHeartbeat ) <= 10000 ;
89
+ lastHeartbeat && ( Date . now ( ) - Number ( lastHeartbeat ) ) / 1000 <= 10000 ;
91
90
const isAvailable = status !== "busy" ;
92
91
93
92
if ( ! isAlive ) {
@@ -102,6 +101,7 @@ class BrowserManager {
102
101
}
103
102
104
103
if ( isAvailable ) {
104
+ console . log ( `Browser ${ browserId } found` ) ;
105
105
await redis . hset ( BROWSER_STATUS , browserId , "busy" ) ;
106
106
return browserId ;
107
107
}
Original file line number Diff line number Diff line change 3
3
"version" : " 1.0.4" ,
4
4
"scripts" : {
5
5
"app:dev" : " cd ./app && npm run dev" ,
6
- "app:build" : " cd ./app && npm run docker:build && docker compose up -d " ,
7
- "browser:build" : " cd ./browser && npm run docker:build && docker compose up -d " ,
6
+ "app:build" : " cd ./app && npm run docker:build" ,
7
+ "browser:build" : " cd ./browser && npm run docker:build" ,
8
8
"build" : " npm run app:build && npm run browser:build" ,
9
9
"start" : " cd .docker/compose && docker compose up -d" ,
10
10
"release" : " npx standard-version" ,
You can’t perform that action at this time.
0 commit comments