Skip to content

Commit 4a319a6

Browse files
authored
Merge pull request #354 from runpod/galen/backwards-compatible-core
Make core envvars backwards compatible
2 parents f3ab92c + d7999f4 commit 4a319a6

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

runpod/serverless/__init__.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,15 @@ 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+
if os.getenv("RUNPOD_SLS_CORE") is None and os.getenv("RUNPOD_USE_CORE") is not None:
177+
log.warn("RUNPOD_USE_CORE is deprecated. Please use RUNPOD_SLS_CORE instead.")
178+
core.main(config)
179+
return
180+
181+
elif os.getenv("RUNPOD_SLS_CORE","false").lower() in ["1", "t", "true"]:
182+
core.main(config)
183+
return
185184

186185
# --------------------------------- Standard --------------------------------- #
187186
worker.main(config)

0 commit comments

Comments
 (0)