(self, cid, rdb)
This creates a safe url for monitors to send failures or success
This creates a safe url for monitors to send failures or success
This creates a safe url for monitors to send failures or success
def genURL(self, cid, rdb):
        ''' This creates a safe url for monitors to send failures or success '''
        s = URLSafeSerializer(self.ctype)
        self.url = s.dumps([cid])
        urldata = {
            'url': self.url
        }
        results = r.table('monitors').get(cid).update(urldata).run(rdb)
        if results['replaced'] == 1:
            return True
        else:
            return False
def genURL ( self , cid , rdb ) : s = URLSafeSerializer ( self . ctype ) self . url = s . dumps ( [ cid ] ) urldata = { 'url' : self . url } results = r . table ( 'monitors' ) . get ( cid ) . update ( urldata ) . run ( rdb ) if results [ 'replaced' ] == 1 : return True else : return False