The zaqar.storage.redis.claims module

class ClaimController(*args, **kwargs)

Bases: zaqar.storage.base.Claim, zaqar.storage.redis.scripting.Mixin

Implements claim resource operations using Redis.

Redis Data Structures:

  1. Claims list (Redis set) contains claim IDs

    Key: <project_id>.<queue_name>.claims

    Name Field
    claim_ids m

2. Claimed Messages (Redis set) contains the list of message ids stored per claim

Key: <claim_id>.messages
  1. Claim info (Redis hash):

    Key: <claim_id>

    Name Field
    ttl t
    id id
    expires e
    num_messages n
create(*args, **kwargs)
delete(*args, **kwargs)
get(*args, **kwargs)
script_names = ['claim_messages']
update(*args, **kwargs)

Previous topic

The zaqar.storage.pooling module

Next topic

The zaqar.storage.redis.controllers module

Project Source

This Page