def queue(self, queue, message, params={}, uids=[]):
        """
        Queue a job in Rhumba
        """
        d = {
            'id': uuid.uuid1().get_hex(),
            'version': 1,
            'message': message,
            'params': params
        }

        if uids:
            for uid in uids:
                yield self.client.lpush('rhumba.dq.%s.%s' % (
                    uid, queue), json.dumps(d))
        else:
            yield self.client.lpush('rhumba.q.%s' % queue, json.dumps(d))

        defer.returnValue(d['id'])
def queue ( self , queue , message , params = { } , uids = [ ] ) : d = { 'id' : uuid . uuid1 ( ) . get_hex ( ) , 'version' : 1 , 'message' : message , 'params' : params } if uids : for uid in uids : yield self . client . lpush ( 'rhumba.dq.%s.%s' % ( uid , queue ) , json . dumps ( d ) ) else : yield self . client . lpush ( 'rhumba.q.%s' % queue , json . dumps ( d ) ) defer . returnValue ( d [ 'id' ] )
Queue a job in Rhumba