mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Ensure consitent code style
This commit is contained in:
parent
7fb1875c21
commit
212262dc7d
@ -7,6 +7,10 @@ from rq.timeouts import JobTimeoutException
|
|||||||
from core.choices import JobStatusChoices
|
from core.choices import JobStatusChoices
|
||||||
from core.models import Job
|
from core.models import Job
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
'BackgroundJob',
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class BackgroundJob(ABC):
|
class BackgroundJob(ABC):
|
||||||
"""
|
"""
|
||||||
@ -18,7 +22,7 @@ class BackgroundJob(ABC):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def run(cls, *args, **kwargs) -> None:
|
def run(cls, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
Run the job.
|
Run the job.
|
||||||
|
|
||||||
@ -62,7 +66,7 @@ class BackgroundJob(ABC):
|
|||||||
"""
|
"""
|
||||||
Enqueue a new `BackgroundJob`.
|
Enqueue a new `BackgroundJob`.
|
||||||
|
|
||||||
This method is a wrapper of `Job.enqueue` using `handle()` as function callback. See its documentation for
|
This method is a wrapper of `Job.enqueue()` using `handle()` as function callback. See its documentation for
|
||||||
parameters.
|
parameters.
|
||||||
"""
|
"""
|
||||||
return Job.enqueue(cls.handle, *args, **kwargs)
|
return Job.enqueue(cls.handle, *args, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user