Skip to content

Commit a23dc0b

Browse files
authored
feat(consts): deprecate default standby port, add standby URL (#479)
This PR deprecates default standby port along with changing its value to the conductor one. It also introduces a new env variable `ACTOR_STANDBY_URL` that will hold the URL of Actor standby for the given Actor run (if applicable) There's also a possibility to deprecate `DEFAULT_CONTAINER_PORT` and create `DEFAULT_WEB_SERVER_PORT`, but I'm not sure if it's worth doing...
1 parent 794a981 commit a23dc0b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/consts/src/consts.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ export const ACTOR_ENV_VARS = {
326326
MEMORY_MBYTES: 'ACTOR_MEMORY_MBYTES',
327327
RUN_ID: 'ACTOR_RUN_ID',
328328
STANDBY_PORT: 'ACTOR_STANDBY_PORT',
329+
STANDBY_URL: 'ACTOR_STANDBY_URL',
329330
STARTED_AT: 'ACTOR_STARTED_AT',
330331
TASK_ID: 'ACTOR_TASK_ID',
331332
TIMEOUT_AT: 'ACTOR_TIMEOUT_AT',
@@ -364,9 +365,10 @@ export const ACTOR_BUILD_ARGS = {
364365
export const DEFAULT_CONTAINER_PORT = 4321;
365366

366367
/**
368+
* @deprecated Please use `DEFAULT_CONTAINER_PORT` instead, the value is the same.
367369
* Default value for ACTOR_STANDBY_PORT used both locally and at Apify platform.
368370
*/
369-
export const DEFAULT_ACTOR_STANDBY_PORT = 4322;
371+
export const DEFAULT_ACTOR_STANDBY_PORT = DEFAULT_CONTAINER_PORT;
370372

371373
/**
372374
* Local emulation sub directories for local stores
@@ -382,7 +384,7 @@ export const LOCAL_STORAGE_SUBDIRS = {
382384
* These are being preset in Apify SDK when it's running out of the Apify platform.
383385
*/
384386
export const LOCAL_ACTOR_ENV_VARS = {
385-
[ACTOR_ENV_VARS.STANDBY_PORT]: DEFAULT_ACTOR_STANDBY_PORT.toString(),
387+
[ACTOR_ENV_VARS.STANDBY_PORT]: DEFAULT_CONTAINER_PORT.toString(),
386388
[ACTOR_ENV_VARS.DEFAULT_DATASET_ID]: 'default',
387389
[ACTOR_ENV_VARS.DEFAULT_KEY_VALUE_STORE_ID]: 'default',
388390
[ACTOR_ENV_VARS.DEFAULT_REQUEST_QUEUE_ID]: 'default',

0 commit comments

Comments
 (0)