MCPcopy Create free account
hub / github.com/vercel/vercel / is_worker_service

Function is_worker_service

python/vercel-runtime/src/vercel_runtime/workers.py:8–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7
8def is_worker_service() -> bool:
9 svc_type = os.environ.get("VERCEL_SERVICE_TYPE") or ""
10 normalized_type = svc_type.strip().lower()
11 if normalized_type == "worker":
12 return True
13
14 svc_trigger = os.environ.get("VERCEL_SERVICE_TRIGGER") or ""
15 normalized_trigger = svc_trigger.strip().lower()
16 return normalized_type == "job" and normalized_trigger in (
17 "queue",
18 "workflow",
19 )
20
21
22def has_worker_services() -> bool:

Callers 3

vc_init.pyFile · 0.90
_start_asgiFunction · 0.90
_setup_appsFunction · 0.90

Calls 3

lowerMethod · 0.80
stripMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected