beat.web.experiments.models.cached_file module

class beat.web.experiments.models.cached_file.CachedFileManager[source]

Bases: django.db.models.manager.Manager

get_by_natural_key(hash)[source]
class beat.web.experiments.models.cached_file.CachedFile(id, hash, status, linear_execution_time, speed_up_real, speed_up_maximal, queuing_time, stdout, stderr, error_report, cpu_time, max_memory, data_read_size, data_read_nb_blocks, data_read_time, data_written_size, data_written_nb_blocks, data_written_time)[source]

Bases: django.db.models.base.Model

NOT_CACHED = 'N'
PROCESSING = 'P'
CACHED = 'C'
STATUS = (('N', 'Not cached'), ('P', 'Processing'), ('C', 'Cached'))
blocks

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.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

hash

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.

linear_execution_time

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

speed_up_real

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

speed_up_maximal

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

queuing_time

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.

error_report

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

cpu_time

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

max_memory

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

data_read_size

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

data_read_nb_blocks

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

data_read_time

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

data_written_size

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

data_written_nb_blocks

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

data_written_time

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.experiments.models.cached_file.CachedFileManager object>
natural_key()[source]
path()[source]

Returns the full path prefix to the cached file on disk

absolute_path(cache='/scratch/builds/iJyPBhV4/1/beat/beat.web/doc/api/prefix/cache')[source]

Returns the full path prefix to the cached file on disk

files(cache='/scratch/builds/iJyPBhV4/1/beat/beat.web/doc/api/prefix/cache')[source]

Checks if any file belonging to this cache exist on disk

update(block_status)[source]
exists(cache='/scratch/builds/iJyPBhV4/1/beat/beat.web/doc/api/prefix/cache')[source]

Checks if any file belonging to this cache exist on disk

check_checksums(cache='/scratch/builds/iJyPBhV4/1/beat/beat.web/doc/api/prefix/cache')[source]

Checks if the cached files checksum properly

delete_files(cache='/scratch/builds/iJyPBhV4/1/beat/beat.web/doc/api/prefix/cache')[source]

Delete the files contained in this cache

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.

inputs

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.

results

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.