Skip to content

Commit

Permalink
pkp/pkp-lib#9678 removed schedule task table and dao
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir committed Jul 1, 2024
1 parent 559a406 commit 66a7802
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
7 changes: 1 addition & 6 deletions classes/plugins/PubObjectsExportPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,7 @@ public function registerSchedules(?Scheduler $scheduler = null): void
->addSchedule(new DOAJInfoSender())
->everyMinute()
->name(DOAJInfoSender::class)
->withoutOverlapping()
->then(function () {
/** @var \PKP\scheduledTask\ScheduledTaskDAO $scheduledTaskDao */
$scheduledTaskDao = DAORegistry::getDAO('ScheduledTaskDAO');
$scheduledTaskDao->updateLastRunTime(DOAJInfoSender::class);
});
->withoutOverlapping();
}

/**
Expand Down
9 changes: 3 additions & 6 deletions classes/scheduler/Scheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,21 @@ public function registerSchedules(): void
->call(fn () => (new SubscriptionExpiryReminder())->execute())
->daily()
->name(SubscriptionExpiryReminder::class)
->withoutOverlapping()
->then(fn () => $this->scheduledTaskDao->updateLastRunTime(SubscriptionExpiryReminder::class));
->withoutOverlapping();

$this
->schedule
->call(fn () => (new UsageStatsLoader([]))->execute())
->daily()
->name(UsageStatsLoader::class)
->withoutOverlapping()
->then(fn () => $this->scheduledTaskDao->updateLastRunTime(UsageStatsLoader::class));
->withoutOverlapping();

$this
->schedule
->call(fn () => (new OpenAccessNotification())->execute())
->hourly()
->name(OpenAccessNotification::class)
->withoutOverlapping()
->then(fn () => $this->scheduledTaskDao->updateLastRunTime(OpenAccessNotification::class));
->withoutOverlapping();

parent::registerSchedules();
}
Expand Down
1 change: 0 additions & 1 deletion dbscripts/xml/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<migration class="PKP\migration\install\InvitationsMigration" />
<migration class="PKP\migration\install\ReviewFormsMigration" />
<migration class="PKP\migration\install\SubmissionFilesMigration" />
<migration class="PKP\migration\install\ScheduledTasksMigration" />
<migration class="PKP\migration\install\LibraryFilesMigration" />
<migration class="PKP\migration\install\ReviewsMigration" />
<migration class="PKP\migration\install\TemporaryFilesMigration" />
Expand Down
1 change: 1 addition & 0 deletions dbscripts/xml/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
<upgrade minversion="3.1.0.0" maxversion="3.4.9.9">
<migration class="PKP\migration\upgrade\v3_5_0\PreflightCheckMigration" fallback="3.4.9.9" />
<migration class="PKP\migration\upgrade\v3_5_0\I9895_AddAppKeyToConfigFile"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9678_RemoveScheduledTasksTable"/>
<migration class="PKP\migration\upgrade\v3_5_0\InstallEmailTemplates"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9197_MigrateAccessKeys"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9253_SiteAnnouncements"/>
Expand Down

0 comments on commit 66a7802

Please sign in to comment.