Skip to content

Commit

Permalink
fix: resolved publish based on release day daily issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CS76 committed Jan 20, 2024
1 parent 21ab958 commit badb231
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions app/Console/Commands/PublishReleasedProjects.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ public function handle(PublishProject $publisher)
foreach ($projects as $project) {
$release_date = Carbon::parse($project->release_date);
if ($release_date->isPast()) {
$publisher->publish($project);
Notification::send($project->owner, new DraftProcessedNotification($project));
if (! is_null($project->doi) && ! $project->is_archived) {
$publisher->publish($project);
Notification::send($project->owner, new DraftProcessedNotification($project));
}
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('nmrxiv:publish')->daily();
// $schedule->command('nmrxiv:publish')->daily();
$schedule->command('nmrxiv:delete-projects')->daily();
$schedule->command('nmrxiv:index-molecules')->daily();
$schedule->command('nmrxiv:delete-citations')->weekly();
Expand Down

0 comments on commit badb231

Please sign in to comment.