(pushAdapter: PushAdapter, subscriberConfig: any = {})
| 25 | channel: string; |
| 26 | |
| 27 | constructor(pushAdapter: PushAdapter, subscriberConfig: any = {}) { |
| 28 | AdaptableController.validateAdapter(pushAdapter, this, PushAdapter); |
| 29 | this.adapter = pushAdapter; |
| 30 | |
| 31 | this.channel = subscriberConfig.channel || PushQueue.defaultPushChannel(); |
| 32 | this.subscriber = ParseMessageQueue.createSubscriber(subscriberConfig); |
| 33 | if (this.subscriber) { |
| 34 | const subscriber = this.subscriber; |
| 35 | subscriber.subscribe(this.channel); |
| 36 | subscriber.on('message', (channel, messageStr) => { |
| 37 | const workItem = JSON.parse(messageStr); |
| 38 | this.run(workItem); |
| 39 | }); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | run({ body, query, pushStatus, applicationId, UTCOffset }: any): Promise<*> { |
| 44 | const config = Config.get(applicationId); |
nothing calls this directly
no test coverage detected