mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Added rescheduleOnBoot
option for post scheduling (#9196)
no issue - allows custom scheduling adapters with persistent data to not reschedule posts when Ghost is restarted
This commit is contained in:
parent
60fd98679f
commit
f44a495cfc
2 changed files with 4 additions and 2 deletions
|
@ -17,6 +17,7 @@ function SchedulingDefault(options) {
|
|||
this.beforePingInMs = -50;
|
||||
this.retryTimeoutInMs = 1000 * 5;
|
||||
|
||||
this.rescheduleOnBoot = true;
|
||||
this.allJobs = {};
|
||||
this.deletedJobs = {};
|
||||
this.isRunning = false;
|
||||
|
|
|
@ -51,12 +51,13 @@ exports.init = function init(options) {
|
|||
return _private.loadClient()
|
||||
.then(function (_client) {
|
||||
client = _client;
|
||||
|
||||
return localUtils.createAdapter(config);
|
||||
})
|
||||
.then(function (_adapter) {
|
||||
adapter = _adapter;
|
||||
|
||||
if (!adapter.rescheduleOnBoot) {
|
||||
return [];
|
||||
}
|
||||
return _private.loadScheduledPosts();
|
||||
})
|
||||
.then(function (scheduledPosts) {
|
||||
|
|
Loading…
Add table
Reference in a new issue