<s> from pyres . failure . redis import RedisBackend <EOL> backend = RedisBackend <EOL> def create ( * args , ** kwargs ) : <EOL> return backend ( * args , ** kwargs ) <EOL> def count ( resq ) : <EOL> return backend . count ( resq ) <EOL> def all ( resq , start , count ) : <EOL> return backend . all ( resq , start , count ) <EOL> def clear ( resq ) : <EOL> return backend . clear ( resq ) <EOL> def requeue ( resq , failure_object ) : <EOL> queue = failure_object . _queue <EOL> payload = failure_object . _payload <EOL> return resq . push ( queue , payload ) <EOL> def retry ( resq , queue , payload ) : <EOL> job = resq . decode ( payload ) <EOL> resq . push ( queue , job [ '<STR_LIT>' ] ) <EOL> return delete ( resq , payload ) <EOL> def delete ( resq , payload ) : <EOL> return resq . redis . lrem ( name = '<STR_LIT>' , num = <NUM_LIT:1> , value = payload ) </s>
