google.appengine.api.queueinfo module
Summary
QueueInfo tools.
QueueInfo is a library for working with QueueInfo records, describing task queue
entries for an application. QueueInfo loads the records from queue.yaml
. To
learn more about the parameters you can specify in queue.yaml
, review the
queue.yaml reference guide.
Contents
- class google.appengine.api.queueinfo.Acl(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Controls the access control list for a single task queue.
- ATTRIBUTES = {u'writer_email': <google.appengine.api.validation.Optional object>, u'user_email': <google.appengine.api.validation.Optional object>}
- google.appengine.api.queueinfo.LoadSingleQueue(queue_info, open_fn=None)source
Loads a
Parametersqueue.yaml
file/string and returns aQueueInfoExternal
object.-
queue_info – The contents of a
queue.yaml
file, as a string. -
open_fn – Function for opening files. Unused.
A
QueueInfoExternal
object.-
- exception google.appengine.api.queueinfo.MalformedQueueConfigurationsource
-
Bases: exceptions.Exception
The configuration file for the task queue is malformed.
- google.appengine.api.queueinfo.ParseRate(rate)source
Parses a rate string in the form
number/unit
, or the literal0
.The unit is one of
Parameterss
(seconds),m
(minutes),h
(hours) ord
(days).rate – The string that contains the rate.
ReturnsA floating point number that represents the
Raisesrate/second
.MalformedQueueConfiguration – If the rate is invalid.
- google.appengine.api.queueinfo.ParseTaskAgeLimit(age_limit)source
Parses a string representing the task’s age limit (maximum allowed age).
The string must be a non-negative integer or floating point number followed by one of
Parameterss
,m
,h
, ord
(seconds, minutes, hours, or days, respectively).age_limit – The string that contains the task age limit.
ReturnsAn integer that represents the age limit in seconds.
RaisesMalformedQueueConfiguration – If the limit argument isn’t a valid Python double followed by a required suffix.
- google.appengine.api.queueinfo.ParseTotalStorageLimit(limit)source
Parses a string representing the storage bytes limit.
- Optional limit suffixes are:
-
-
B
(bytes) -
K
(kilobytes) -
M
(megabytes) -
G
(gigabytes) -
T
(terabytes)
-
limit – The string that specifies the storage bytes limit.
ReturnsAn integer that represents the storage limit in bytes.
RaisesMalformedQueueConfiguration – If the limit argument isn’t a valid Python double followed by an optional suffix.
- class google.appengine.api.queueinfo.QueueEntry(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Describes a single task queue.
- ATTRIBUTES = {u'max_concurrent_requests': <google.appengine.api.validation.Optional object>, u'rate': <google.appengine.api.validation.Optional object>, u'name': u'^[A-Za-z0-9-]{0,499}$', u'target': <google.appengine.api.validation.Optional object>, u'retry_parameters': <google.appengine.api.validation.Optional object>, u'acl': <google.appengine.api.validation.Optional object>, u'bucket_size': <google.appengine.api.validation.Optional object>, u'mode': <google.appengine.api.validation.Optional object>}
- class google.appengine.api.queueinfo.QueueInfoExternal(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Describes all of the queue entries for an application.
- ATTRIBUTES = {u'queue': <google.appengine.api.validation.Optional object>, 'application': <google.appengine.api.validation.Optional object>, u'total_storage_limit': <google.appengine.api.validation.Optional object>}
- class google.appengine.api.queueinfo.RetryParameters(**attributes)source
-
Bases: google.appengine.api.validation.Validated
Specifies the retry parameters for a single task queue.
- ATTRIBUTES = {u'task_retry_limit': <google.appengine.api.validation.Optional object>, u'min_backoff_seconds': <google.appengine.api.validation.Optional object>, u'task_age_limit': <google.appengine.api.validation.Optional object>, u'max_backoff_seconds': <google.appengine.api.validation.Optional object>, u'max_doublings': <google.appengine.api.validation.Optional object>}
- google.appengine.api.queueinfo.TranslateRetryParameters(retry)source
Populates a
ParametersTaskQueueRetryParameters
from aqueueinfo.RetryParameters
.retry – A
Returnsqueueinfo.RetryParameters
that is read fromqueue.yaml
that describes the queue’s retry parameters.A
Raisestaskqueue_service_pb.TaskQueueRetryParameters
proto populated with the data fromretry
.MalformedQueueConfiguration – If the retry parameters are invalid.