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:
18
src/Adapters/PubSub/RedisPubSub.js
Normal file
18
src/Adapters/PubSub/RedisPubSub.js
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user