2017-10-12 10:00:28 +08:00
|
|
|
import RedisPubSub from '/imports/startup/server/redis';
|
2016-10-21 21:21:09 +08:00
|
|
|
import handlePollStarted from './handlers/pollStarted';
|
2017-10-12 08:33:57 +08:00
|
|
|
import handlePollStopped from './handlers/pollStopped';
|
|
|
|
import handlePollPublished from './handlers/pollPublished';
|
2016-10-21 21:21:09 +08:00
|
|
|
import handleUserVoted from './handlers/userVoted';
|
2018-10-10 23:49:58 +08:00
|
|
|
import handleUserResponded from './handlers/userResponded';
|
2020-09-21 20:07:36 +08:00
|
|
|
import handleUserTypedResponse from './handlers/userTypedResponse';
|
2016-10-21 21:21:09 +08:00
|
|
|
|
2017-10-12 08:33:57 +08:00
|
|
|
RedisPubSub.on('PollShowResultEvtMsg', handlePollPublished);
|
|
|
|
RedisPubSub.on('PollStartedEvtMsg', handlePollStarted);
|
|
|
|
RedisPubSub.on('PollStoppedEvtMsg', handlePollStopped);
|
2017-12-13 00:19:24 +08:00
|
|
|
RedisPubSub.on('PollUpdatedEvtMsg', handleUserVoted);
|
2018-10-10 23:49:58 +08:00
|
|
|
RedisPubSub.on('UserRespondedToPollRespMsg', handleUserResponded);
|
2020-09-21 20:07:36 +08:00
|
|
|
RedisPubSub.on('UserRespondedToTypedPollRespMsg', handleUserTypedResponse);
|