Commit 123a75d2 authored by Johannes's avatar Johannes

Move bellupdatetrigger to maintenance class

parent 9c9a0a8f
Pipeline #107545195 passed with stages
in 14 minutes and 59 seconds
......@@ -74,6 +74,7 @@
- Disallow foodsharing email addresses to be used as password restore addresses !1268 #744 @alex.simm
- Remove email addresses from the bounce list before sending a confirmation mail !1268 #756 @alex.simm
- Move map control elements on small devices #695 !1286 @lea.mzw
- Move bellupdatetrigger() to maintenance class only executing it nightly. Accidentally fixes the date distance to a unconfirmed slot which was reseted every 5 minutes before !1300 @jofranz
## Refactoring
- refactored to use count() instead of more complicated expressions !1273 !1296 @Caluera
......
......@@ -2,8 +2,6 @@
namespace Foodsharing\Command;
use Foodsharing\Modules\Bell\BellUpdateTrigger;
use Foodsharing\Modules\Store\StoreGateway;
use Foodsharing\Modules\Mails\MailsControl;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
......@@ -13,23 +11,14 @@ class CronCommand extends Command
{
protected static $defaultName = 'foodsharing:cronjob';
/**
* @var BellUpdateTrigger
*/
private $bellUpdateTrigger;
/**
* @var MailsControl
*/
private $mailsControl;
public function __construct(BellUpdateTrigger $bellUpdateTrigger, StoreGateway $storeGateway, MailsControl $mailsControl)
public function __construct(MailsControl $mailsControl)
{
$this->bellUpdateTrigger = $bellUpdateTrigger;
$this->mailsControl = $mailsControl;
/* storeGateway is intentionally injected because it registers an updatetrigger.
TODO this mechanism seems very likely to get back on us :-) */
($storeGateway);
parent::__construct();
}
......@@ -43,7 +32,6 @@ class CronCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output): void
{
$this->bellUpdateTrigger->triggerUpdate();
$this->mailsControl->fetchMails();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment