SchedulerManager#
- class pyedb.workflows.job_manager.backend.service.SchedulerManager(scheduler_type: pyedb.workflows.job_manager.backend.job_submission.SchedulerType)#
Thin async wrapper around cluster scheduler commands.
Provides live introspection of SLURM and LSF clusters including:
List of partitions / queues with resource information
Per-partition: total & free cores, total & free memory
Global job table (running, pending, etc.)
All methods are coroutines so they can be awaited from the REST layer without blocking the event-loop.
- Parameters:
- scheduler_type
SchedulerType Type of scheduler (SLURM or LSF only)
- scheduler_type
- Raises:
ValueErrorIf scheduler_type is not SLURM or LSF
Overview#
Get list of scheduler partitions/queues with resource information. |
|
Get global job table (all users). |
Import detail#
from pyedb.workflows.job_manager.backend.service import SchedulerManager
Attribute detail#
- SchedulerManager.scheduler_type#
Method detail#
- async SchedulerManager.get_partitions() List[Dict[str, Any]]#
Get list of scheduler partitions/queues with resource information.
- Returns:
List[Dict[str,Any]]List of partition dictionaries with keys: - name: Partition/queue name - cores_total: Total available cores - cores_used: Currently used cores - memory_total_gb: Total memory in GB - memory_used_gb: Currently used memory in GB
- Raises:
RuntimeErrorIf scheduler command execution fails
- async SchedulerManager.get_jobs() List[Dict[str, Any]]#
Get global job table (all users).
- Returns:
List[Dict[str,Any]]List of job dictionaries with keys: - job_id: Scheduler job ID - partition: Partition/queue name - user: Job owner username - state: Job state (RUNNING, PENDING, etc.) - nodes: Number of nodes allocated - cpus: Number of CPUs allocated - memory_gb: Memory allocated in GB
- Raises:
RuntimeErrorIf scheduler command execution fails