feat: add new type all

This commit is contained in:
2023-07-20 13:12:17 +08:00
parent 08e818e1e1
commit 8cf674f0df
8 changed files with 185 additions and 8 deletions

View File

@@ -5,14 +5,15 @@ from namekoplus import init_statsd, init_sentry
class EventPublisherService:
name = "publisher_service"
dispatch = EventDispatcher()
name = "publisher_service"
tracer = Tracer()
sentry = init_sentry()
statsd = init_statsd('statsd_prefix', 'statsd_host', 'statsd_port')
dispatch = EventDispatcher()
@rpc
@statsd.timer('publish')
def publish(self, event_type, payload):
@@ -20,8 +21,10 @@ class EventPublisherService:
class AnEventListenerService:
name = "an_event_listener_service"
tracer = Tracer()
sentry = init_sentry()
statsd = init_statsd('statsd_prefix', 'statsd_host', 'statsd_port')
@@ -32,8 +35,10 @@ class AnEventListenerService:
class AnotherEventListenerService:
name = "another_event_listener_service"
tracer = Tracer()
sentry = init_sentry()
statsd = init_statsd('statsd_prefix', 'statsd_host', 'statsd_port')
@@ -44,8 +49,10 @@ class AnotherEventListenerService:
class ListenBothEventsService:
name = "listen_both_events_service"
tracer = Tracer()
sentry = init_sentry()
statsd = init_statsd('statsd_prefix', 'statsd_host', 'statsd_port')