-
-
Notifications
You must be signed in to change notification settings - Fork 404
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c85a83
commit 3197586
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
tests/fixtures/make-schedule/expected/DefaultScheduleWithTransportName.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace App\Scheduler; | ||
|
||
use Symfony\Component\Scheduler\Attribute\AsSchedule; | ||
use Symfony\Component\Scheduler\RecurringMessage; | ||
use Symfony\Component\Scheduler\Schedule; | ||
use Symfony\Component\Scheduler\ScheduleProviderInterface; | ||
use Symfony\Contracts\Cache\CacheInterface; | ||
|
||
#[AsSchedule('dummy')] | ||
final class MainSchedule implements ScheduleProviderInterface | ||
{ | ||
public function __construct( | ||
private CacheInterface $cache, | ||
) { | ||
} | ||
|
||
public function getSchedule(): Schedule | ||
{ | ||
return (new Schedule()) | ||
->add( | ||
// @TODO - Create a Message to schedule | ||
// RecurringMessage::every('1 hour', new App\Message\Message()), | ||
) | ||
->stateful($this->cache) | ||
; | ||
} | ||
} |