Exemplo n.º 1
0
 def _register_as_publisher(self):
     self.nb_api.create(
         core.Publisher(
             id=self.uuid,
             uri=self._get_uri(),
             last_activity_timestamp=time.time(),
         ), )
Exemplo n.º 2
0
 def _update_timestamp_in_db(self):
     if self._rate_limit():
         return
     try:
         self.nb_api.update(
             core.Publisher(
                 id=self.uuid,
                 last_activity_timestamp=time.time(),
             ), )
     except exceptions.DBKeyNotFound:
         self._register_as_publisher()