Skip to content

Commit 3ff5504

Browse files
committed
Make core backwards compatible.
this way users won't be surprised if the old envvar stops working.
1 parent acf7651 commit 3ff5504

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

runpod/serverless/__init__.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,16 @@ def start(config: Dict[str, Any]):
172172
return
173173

174174
# --------------------------------- SLS-Core --------------------------------- #
175-
if os.getenv("RUNPOD_SLS_CORE", "false").lower() in (
176-
"1",
177-
"t",
178-
"T",
179-
"TRUE",
180-
"true",
181-
"True",
182-
):
183-
core.main(config)
184-
return
175+
176+
match os.getenv("RUNPOD_SLS_CORE"):
177+
case None if os.getenv("RUNPOD_USE_CORE") is not None:
178+
log.warn("RUNPOD_USE_CORE is deprecated. Please use RUNPOD_SLS_CORE instead.")
179+
core.main(config)
180+
return
181+
182+
case x if x.lower() in ["1", "t", "T", "TRUE", "true", "True"]:
183+
core.main(config)
184+
return
185185

186186
# --------------------------------- Standard --------------------------------- #
187187
worker.main(config)

0 commit comments

Comments
 (0)