(self, ev, sql_queue_func, arg)
Filter event by hash in extra3, apply only if for local shard.
Filter event by hash in extra3, apply only if for local shard.
Filter event by hash in extra3 apply only if for local shard .
def process_event(self, ev, sql_queue_func, arg):
        """Filter event by hash in extra3, apply only if for local shard."""
        if ev.extra3 and self.hash_key is not None:
            meta = skytools.db_urldecode(ev.extra3)
            self.log.debug('shard.process_event: hash=%i, hash_mask=%i, shard_nr=%i',
                           int(meta['hash']), self.hash_mask, self.shard_nr)
            if (int(meta['hash']) & self.hash_mask) != self.shard_nr:
                self.log.debug('shard.process_event: not my event')
                return
        self._process_event(ev, sql_queue_func, arg)
def process_event ( self , ev , sql_queue_func , arg ) : if ev . extra3 and self . hash_key is not None : meta = skytools . db_urldecode ( ev . extra3 ) self . log . debug ( 'shard.process_event: hash=%i, hash_mask=%i, shard_nr=%i' , int ( meta [ 'hash' ] ) , self . hash_mask , self . shard_nr ) if ( int ( meta [ 'hash' ] ) & self . hash_mask ) != self . shard_nr : self . log . debug ( 'shard.process_event: not my event' ) return self . _process_event ( ev , sql_queue_func , arg )