runtraj.execution.kubernetes.cron_job_name#

runtraj.execution.kubernetes.cron_job_name(name, project)[source]#

Return the name of a project’s CronJob: runtraj-<name>-<hash>.

The hash is of where the pods open the project (project_key()), so two projects whose folders share a name (s3://lab-a/winter, s3://lab-b/winter) get two CronJobs, while scheduling one project again replaces its own. The name is cut to 35 characters, which keeps the whole within the 52 Kubernetes allows a CronJob.

Examples

>>> cron_job_name("winter", "s3://lab-a/projects/winter")
'runtraj-winter-4a2ff0c8'
Return type:

str

Parameters: