Skip to content

Commit

Permalink
Fix running scheduled search index job. (#104)
Browse files Browse the repository at this point in the history
Arguments need to be passed as an array since passing shell commands as a string to the Process component is deprecated since Symfony 4.2. Related Grav fix which is also needed for this patch to work properly: getgrav/grav@1661dc9

This also finally fixes issue #81.
  • Loading branch information
ViliusS authored Nov 4, 2020
1 parent ca9dca0 commit 87c84bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tntsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function onSchedulerInitialized(Event $e): void
$scheduler = $e['scheduler'];
$at = $this->config->get('plugins.tntsearch.scheduled_index.at');
$logs = $this->config->get('plugins.tntsearch.scheduled_index.logs');
$job = $scheduler->addCommand('bin/plugin tntsearch index', [], 'tntsearch-index');
$job = $scheduler->addCommand('bin/plugin', ['tntsearch', 'index'], 'tntsearch-index');
$job->at($at);
$job->output($logs);
$job->backlink('/plugins/tntsearch');
Expand Down

0 comments on commit 87c84bd

Please sign in to comment.