Adds support for PushScheduling (#3722)

* Add support for push scheduling

Add a configuration flag on the server to handle the availability of
push scheduling.

* Update push controller to skip sending only if scheduling is configured

Only skip push sending if scheduling is configured

* Update bad conventions

* Add CLI definitions for push scheduling

* Adds tests for pushTime

* Adds test for scheduling

* nits

* Test for not scheduled
This commit is contained in:
Florent Vilmart
2017-04-15 17:20:55 -04:00
committed by GitHub
parent 302a0dda73
commit 907b160fc7
7 changed files with 186 additions and 8 deletions

View File

@@ -95,6 +95,7 @@ class ParseServer {
analyticsAdapter,
filesAdapter,
push,
scheduledPush = false,
loggerAdapter,
jsonLogs = defaults.jsonLogs,
logsFolder = defaults.logsFolder,
@@ -182,6 +183,7 @@ class ParseServer {
const pushController = new PushController();
const hasPushSupport = pushAdapter && push;
const hasPushScheduledSupport = pushAdapter && push && scheduledPush;
const {
disablePushWorker
@@ -259,7 +261,8 @@ class ParseServer {
userSensitiveFields,
pushWorker,
pushControllerQueue,
hasPushSupport
hasPushSupport,
hasPushScheduledSupport
});
Config.validate(AppCache.get(appId));