Beispiel #1
0
def handle_action_start(data):
    action_name = data['action_name']
    if action_name not in hello_world_channel_names:
        hello_world_channel_names[action_name] = \
            create_interface_channel_name('HelloWorld', 'action_{}'.format(action_name))

    blueprint.cache.incr(hello_world_channel_names[action_name])
Beispiel #2
0
 def test_init(self):
     stream = FilteredInterfaceSseStream('HelloWorld3', 'random_filtered')
     self.assertEqual(stream.interface, 'HelloWorld3')
     self.assertEqual(
         stream.channel,
         create_interface_channel_name('HelloWorld3', 'random_filtered'))
Beispiel #3
0
 def test_init(self):
     stream = InterfaceSseStream('HelloWorld2', 'random')
     self.assertEqual(stream.interface, 'HelloWorld2')
     self.assertEqual(stream.channel, create_interface_channel_name('HelloWorld2', 'random'))
Beispiel #4
0
 def test_create_interface_channel_name(self):
     self.assertEqual(create_interface_channel_name('HelloWorld', 'count'), 'HelloWorld::count')
Beispiel #5
0
 def test_init(self):
     stream = InterfaceSseStream('HelloWorld2', 'random')
     self.assertEqual(stream.interface, 'HelloWorld2')
     self.assertEqual(
         stream.channel,
         create_interface_channel_name('HelloWorld2', 'random'))
Beispiel #6
0
 def test_create_interface_channel_name(self):
     self.assertEqual(create_interface_channel_name('HelloWorld', 'count'),
                      'HelloWorld::count')
 def test_init(self):
     stream = FilteredInterfaceSseStream('HelloWorld3', 'random_filtered')
     self.assertEqual(stream.interface, 'HelloWorld3')
     self.assertEqual(stream.channel, create_interface_channel_name('HelloWorld3', 'random_filtered'))