Live query pubsub adapter (#2902)

* Moves LiveQuery pub/sub to adapter folder

* Adds ability to provide custom adapter for LiveQuery pubsub

* Adds test for function based adapter

* Pass all options to createSubscriber

* nits
This commit is contained in:
Florent Vilmart
2016-10-28 12:06:35 -04:00
committed by GitHub
parent f23c0a57ee
commit 23b77f7261
7 changed files with 92 additions and 30 deletions

View File

@@ -0,0 +1,18 @@
import redis from 'redis';
function createPublisher({redisURL}): any {
return redis.createClient(redisURL, { no_ready_check: true });
}
function createSubscriber({redisURL}): any {
return redis.createClient(redisURL, { no_ready_check: true });
}
const RedisPubSub = {
createPublisher,
createSubscriber
}
export {
RedisPubSub
}