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

@@ -54,9 +54,7 @@ class ParseLiveQueryServer {
);
// Initialize subscriber
this.subscriber = ParsePubSub.createSubscriber({
redisURL: config.redisURL
});
this.subscriber = ParsePubSub.createSubscriber(config);
this.subscriber.subscribe('afterSave');
this.subscriber.subscribe('afterDelete');
// Register message handler for subscriber. When publisher get messages, it will publish message