beat.web.backend.models package¶
Submodules¶
Module contents¶
-
class
beat.web.backend.models.Environment(*args, **kwargs)[source]¶ Bases:
beat.web.common.models.ShareableDefines a software environment to run algorithms
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
version¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
short_description¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
description¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
creation_date¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
active¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
previous_version¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
objects= <beat.web.backend.models.environment.EnvironmentManager object>¶
-
queues_for(user)[source]¶ Returns all queues associated to this environment for which the user has the ‘can_access’ permission
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
blocks¶ 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
get_next_by_creation_date(*, field=<django.db.models.fields.DateTimeField: creation_date>, is_next=True, **kwargs)¶
-
get_previous_by_creation_date(*, field=<django.db.models.fields.DateTimeField: creation_date>, is_next=False, **kwargs)¶
-
get_sharing_display(*, field=<django.db.models.fields.CharField: sharing>)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
languages¶ 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
next_versions¶ 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
previous_version_id¶
-
queues¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.EnvironmentLanguage(id, environment, language)[source]¶ Bases:
django.db.models.base.Model-
environment¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
language¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
environment_id¶
-
get_language_display(*, field=<django.db.models.fields.CharField: language>)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
-
class
beat.web.backend.models.EnvironmentManager[source]¶
-
class
beat.web.backend.models.Job(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelClass 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.placeis aForwardOneToOneDescriptorinstance.
-
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.placeis aForwardOneToOneDescriptorinstance.
-
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.childrenis aReverseManyToOneDescriptorinstance.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.JobSplit(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelClass 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.parentis aForwardManyToOneDescriptorinstance.
-
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.parentis aForwardManyToOneDescriptorinstance.
-
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.placeis aForwardOneToOneDescriptorinstance.
-
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>¶
-
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¶
-
-
class
beat.web.backend.models.Queue(id, name, memory_limit, time_limit, cores_per_slot, max_slots_per_user)[source]¶ Bases:
django.db.models.base.Model-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
memory_limit¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
time_limit¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
cores_per_slot¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
max_slots_per_user¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
environments¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
objects= <beat.web.backend.models.queue.QueueManager object>¶
-
availability()[source]¶ Returns the availability for this queue in terms of number of slots
This method does not take into consideration the occupation of this queue slots caused by jobs on other queues. It only looks to its inner occupancy and reports on that.
Returns an integer between 0 and
Queue.slots().
-
worker_availability()[source]¶ - Returns an ordered dictionary indicating the availability of workers
according to their queue priority.
The dictionary contains, as value, the number of slots available per worker
The order of workers is sorted by:
slot priority (the higher, the better)
load (the lower, the better)
name (alphabetically)
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
blocks¶ 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
slots¶ 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.childrenis aReverseManyToOneDescriptorinstance.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.Result(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelLogging and status information concerning block or job execution.
-
status¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
stdout¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
stderr¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
usrerr¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
timed_out¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
cancelled¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
stats¶
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
job¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
objects= <django.db.models.manager.Manager object>¶
-
split¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
-
class
beat.web.backend.models.Slot(id, queue, worker, quantity, priority)[source]¶ Bases:
django.db.models.base.Model-
queue¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
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.parentis aForwardManyToOneDescriptorinstance.
-
quantity¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
priority¶ 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.slot.SlotManager object>¶
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
queue_id¶
-
worker_id¶
-
-
class
beat.web.backend.models.Worker(id, name, active, update, updated, cores, memory, used_cores, used_memory, info)[source]¶ Bases:
django.db.models.base.Model-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
active¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
update¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
updated¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
cores¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
memory¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
used_cores¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
used_memory¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
info¶ 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.worker.WorkerManager object>¶
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
slots¶ 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-