File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Specify the base Docker image. You can read more about
2
2
# the available images at https://crawlee.dev/docs/guides/docker-images
3
3
# You can also use any other image from Docker Hub.
4
- FROM apify/actor-node-puppeteer-chrome:18 AS builder
4
+ FROM apify/actor-node-puppeteer-chrome:20-21.4.0 AS builder
5
5
6
6
# Copy just package.json and package-lock.json
7
7
# to speed up the build using Docker layer cache.
@@ -19,7 +19,7 @@ COPY --chown=myuser . ./
19
19
RUN yarn run build
20
20
21
21
# Create final image
22
- FROM apify/actor-node-puppeteer-chrome:18
22
+ FROM apify/actor-node-puppeteer-chrome:20-21.4.0
23
23
24
24
# Copy only built JS files from builder image
25
25
COPY --from=builder --chown=myuser /home/myuser/dist ./dist
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export class Sender {
11
11
index_uid : string
12
12
batch_size : number
13
13
client : MeiliSearch
14
+ timeout : number
14
15
nb_documents_sent = 0
15
16
16
17
constructor ( config : Config ) {
@@ -19,6 +20,7 @@ export class Sender {
19
20
this . initial_index_uid = config . meilisearch_index_uid
20
21
this . index_uid = this . initial_index_uid
21
22
this . batch_size = config . batch_size || 1000
23
+ this . timeout = config . timeout || 100000
22
24
23
25
//Create a Meilisearch client
24
26
this . client = initMeilisearchClient ( {
@@ -116,7 +118,7 @@ export class Sender {
116
118
const task = await this . client
117
119
. index ( this . index_uid )
118
120
. addDocuments ( this . queue )
119
- await this . client . waitForTask ( task . taskUid , { timeOutMs : 15000 } )
121
+ await this . client . waitForTask ( task . taskUid , { timeOutMs : this . timeout } )
120
122
}
121
123
122
124
async __swapIndex ( ) {
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export type Config = {
22
22
user_agents ?: string [ ]
23
23
webhook_payload ?: Record < string , any >
24
24
webhook_url ?: string
25
+ timeout ?: number
25
26
}
26
27
27
28
export type SchemaSettings = {
You can’t perform that action at this time.
0 commit comments