Bases: object
Descope messages set with ‘.’
Returns: | (queue, project) |
---|
Descope Queue name with ‘.’.
Returns the queue name from the scoped name which is of the form project-id.queue-name
Descope subscriptions set with ‘.’
Returns: | (queue, project) |
---|
Return True IFF the message is currently claimed.
Return True IFF the specified client posted the message.
Return True IFF the message has expired.
Returns ‘’ IFF given value is None, passthrough otherwise.
This function normalizes None to the empty string to facilitate string concatenation when a variable could be None.
Handles the Redis ConnectionFailure error.
This decorator catches Redis’s ConnectionError and raises Zaqar’s ConnectionError instead.
Causes the wrapped function to be re-called on ConnectionError.
This decorator catches Redis ConnectionError and retries the function call.
Note
Assumes that the decorated function has defined self.driver.redis_cinf so that max_reconnect_attempts and reconnect_sleep can be taken into account.
Warning
The decorated function must be idempotent.
Returns a scoped name for a queue based on project and queue.
If only the project name is specified, a scope signifying “all queues” for that project is returned. If neither queue nor project are specified, a scope for “all global queues” is returned, which is to be interpreted as excluding queues scoped by project.
Returns: | ‘{project}.{queue}’ if project and queue are given, ‘{project}.’ if ONLY project is given, ‘.{queue}’ if ONLY queue is given, and ‘.’ if neither are given. |
---|
Scope messages set with ‘.’
Returns a scoped name for the list of messages in the form project-id_queue-name_suffix
Scope messages set with ‘.’
Returns a scoped name for the list of messages in the form project-id_queue-name_suffix
Returns a scoped name for a queue based on project and queue.
If only the project name is specified, a scope signifying “all queues” for that project is returned. If neither queue nor project are specified, a scope for “all global queues” is returned, which is to be interpreted as excluding queues scoped by project.
Returns: | ‘{project}.{queue}’ if project and queue are given, ‘{project}.’ if ONLY project is given, ‘.{queue}’ if ONLY queue is given, and ‘.’ if neither are given. |
---|
Scope messages set with ‘.’
Returns a scoped name for the list of messages in the form project-id_queue-name_suffix
Scope messages set with ‘.’
Returns a scoped name for the list of messages in the form project-id_queue-name_suffix
Returns a scoped name for a queue based on project and queue.
If only the project name is specified, a scope signifying “all queues” for that project is returned. If neither queue nor project are specified, a scope for “all global queues” is returned, which is to be interpreted as excluding queues scoped by project.
Returns: | ‘{project}.{queue}’ if project and queue are given, ‘{project}.’ if ONLY project is given, ‘.{queue}’ if ONLY queue is given, and ‘.’ if neither are given. |
---|
Scope subscriptions set with ‘.’
Returns a scoped name for the list of subscriptions in the form project-id_queue-name_suffix