LifecycleModule.bindStartupAction(binder(), RegisterGauges.class);
} else {
executor = MoreExecutors.sameThreadExecutor();
}
final EventBus eventBus = new AsyncEventBus("AsyncTaskEvents", executor);
eventBus.register(new DeadEventHandler());
bind(EventBus.class).toInstance(eventBus);
EventSink eventSink = new EventSink() {
@Override
public void post(PubsubEvent event) {
eventBus.post(event);
}
};
bind(EventSink.class).toInstance(eventSink);
// Ensure at least an empty binding is present.