예제 #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])
예제 #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'))
예제 #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'))
예제 #4
0
 def test_create_interface_channel_name(self):
     self.assertEqual(create_interface_channel_name('HelloWorld', 'count'), 'HelloWorld::count')
예제 #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'))
예제 #6
0
 def test_create_interface_channel_name(self):
     self.assertEqual(create_interface_channel_name('HelloWorld', 'count'),
                      'HelloWorld::count')
예제 #7
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'))