MCPcopy Create free account
hub / github.com/vercel/examples / create_job

Function create_job

python/celery/worker/store.py:33–38  ·  view source on GitHub ↗
(job_id: str, *, task: str, params: dict[str, Any])

Source from the content-addressed store, hash-verified

31
32
33def create_job(job_id: str, *, task: str, params: dict[str, Any]) -> Job:
34 now = time.time()
35 job = Job(id=job_id, task=task, params=params, created_at=now)
36 r.set(JOB_KEY.format(job_id), job.model_dump_json())
37 r.zadd(JOBS_SET, {job_id: now})
38 return job
39
40
41def get_job(job_id: str) -> Job | None:

Callers 1

enqueue_jobFunction · 0.90

Calls 2

JobClass · 0.85
setMethod · 0.80

Tested by

no test coverage detected