menu

django-redis

PRO Only

class viewflow.contrib.redis.RedisLock(cache=<django.core.cache.DefaultCacheProxy object>, attempts=5, expires=120)

Task lock based on redis’ cache capabilities.

Example:

class MyFlow(Flow):
    lock_impl = RedisLock(cache=caches['locks'])

The example uses a different cache. The default cache is Django’s default cache configuration.

..note::
This lock requires a django-redis cache backend.
viewflow.contrib.redis.redis_lock