Пример #1
0
def iregistered_domains():
    """Return an iterator of all the registered domains."""
    domain_keys_iter = db.ikeys('registered_for_reporting')
    while True:
        domain_key = domain_keys_iter.next()
        if domain_key is not None:
            yield domain_key.split('registered_for_reporting:')[1]
Пример #2
0
def isubscriptions():
    """Return an iterator of subscription information."""
    keys_iter = db.ikeys('email_sub')
    while True:
        key = keys_iter.next()
        if key is not None:
            sub = db.get(key)
            if sub is not None:
                yield key.split('email_sub:')[1], sub