Пример #1
0
    def publish_one(self, client, topic):
        t = PubSubTopic.find(topic)

        if t:
            logger.debug('publishing data once for %s to %s', topic, client)
            client.send(topic, t.payload(use_cache=True, name=topic))
Пример #2
0
  def publish_one(self, client, topic):
    t = PubSubTopic.find(topic)

    if t:
      logger.debug('publishing data once for %s to %s', topic, client)
      client.send(topic, t.payload(useCache=True, name=topic))
Пример #3
0
 def test_not_exists(self):
   self.assertEqual(PubSubTopic.find("foobar"), None)
Пример #4
0
  def test_exists(self):
    topic = PubSubTopic("foo", None, None)

    self.assertEqual(PubSubTopic.find("foo"), topic)
Пример #5
0
    def test_exists(self):
        topic = PubSubTopic("foo", None, None)

        self.assertEqual(PubSubTopic.find("foo"), topic)
Пример #6
0
 def test_not_exists(self):
     self.assertEqual(PubSubTopic.find("foobar"), None)