beat.web.backend.models.job module

class beat.web.backend.models.job.JobManager[source]

Bases: django.db.models.manager.Manager

create_job(block)[source]
class beat.web.backend.models.job.Job(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Class describing the execution of a Job on the backend

block

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

result

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

runnable_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

start_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

end_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

key

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

mirror

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <beat.web.backend.models.job.JobManager object>
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

block_id
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

result_id
splits

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class beat.web.backend.models.job.JobSplitManager[source]

Bases: django.db.models.manager.Manager

create_splits(job)[source]
class beat.web.backend.models.job.JobSplit(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Class describing a part of job of an experiment

QUEUED = 'N'
PROCESSING = 'P'
COMPLETED = 'C'
FAILED = 'F'
CANCELLED = 'L'
CANCELLING = 'K'
STATUS = (('N', 'Queued'), ('P', 'Processing'), ('C', 'Completed'), ('F', 'Failed'), ('L', 'Cancelled'), ('K', 'Cancelling'))
worker

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

job

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

split_index

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

start_index

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

end_index

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

result

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

start_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

end_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <beat.web.backend.models.job.JobSplitManager object>
done()[source]

Says whether the job has finished or not

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

job_id
result_id
worker_id