|
24 | 24 |
|
25 | 25 | from typing import Union, Any |
26 | 26 | from pyslurm.core.error import RPCError, PyslurmError |
27 | | -from pyslurm.core import slurmctld |
28 | | -from typing import Any |
29 | 27 | from pyslurm.utils.uint import * |
30 | | -from pyslurm.settings import LOCAL_CLUSTER |
| 28 | +from pyslurm import settings |
31 | 29 | from pyslurm import xcollections |
32 | 30 | from pyslurm.utils.ctime import ( |
33 | 31 | date_to_timestamp, |
@@ -106,7 +104,7 @@ cdef class JobFilter: |
106 | 104 | if not self.clusters: |
107 | 105 | # This is a requirement for some other parameters to function |
108 | 106 | # correctly, like self.nodelist |
109 | | - return [LOCAL_CLUSTER] |
| 107 | + return [settings.LOCAL_CLUSTER] |
110 | 108 | elif self.clusters == "all": |
111 | 109 | return None |
112 | 110 | else: |
@@ -450,7 +448,7 @@ cdef class Job: |
450 | 448 | self._alloc_impl() |
451 | 449 | self.ptr.jobid = int(job_id) |
452 | 450 | cstr.fmalloc(&self.ptr.cluster, |
453 | | - LOCAL_CLUSTER if not cluster else cluster) |
| 451 | + settings.LOCAL_CLUSTER if not cluster else cluster) |
454 | 452 | self.qos_data = QualitiesOfService() |
455 | 453 | self.steps = JobSteps() |
456 | 454 | self.stats = JobStatistics() |
@@ -511,7 +509,7 @@ cdef class Job: |
511 | 509 | >>> db_job = pyslurm.db.Job.load(10000, with_script=True) |
512 | 510 | >>> print(db_job.script) |
513 | 511 | """ |
514 | | - cluster = LOCAL_CLUSTER if not cluster else cluster |
| 512 | + cluster = settings.LOCAL_CLUSTER if not cluster else cluster |
515 | 513 | jfilter = JobFilter(ids=[int(job_id)], clusters=[cluster], |
516 | 514 | with_script=with_script, with_env=with_env) |
517 | 515 | job = Jobs.load(jfilter).get((cluster, int(job_id))) |
|
0 commit comments