This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for galaxy.webapps.galaxy.api.job_lock

from fastapi import (

from galaxy.managers.jobs import JobLock, JobManager
from . import depends, Router

router = Router(tags=['job_lock'])

[docs]@router.get('/api/job_lock', require_admin=True) def job_lock_status(job_manager: JobManager = depends(JobManager)) -> JobLock: """Get job lock status.""" return job_manager.job_lock()
[docs]@router.put('/api/job_lock', require_admin=True) def update_job_lock(job_manager: JobManager = depends(JobManager), job_lock: JobLock = Body(...)) -> JobLock: """Set job lock status.""" return job_manager.update_job_lock(job_lock)