-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
13 changed files
with
440 additions
and
259 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
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
24 changes: 0 additions & 24 deletions
24
packages/mango/Scheduler/Doctrine/Table/SchedulerTriggersTable.php
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
packages/mango/Scheduler/Message/SchedulerTriggerHandler.php
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
packages/mango/Scheduler/Messenger/ScheduleMessageStamp.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,46 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Manyou\Mango\Scheduler\Messenger; | ||
|
||
use Symfony\Component\Messenger\Stamp\NonSendableStampInterface; | ||
|
||
class ScheduleMessageStamp implements NonSendableStampInterface | ||
{ | ||
private function __construct( | ||
public readonly string $key, | ||
public readonly string $action, | ||
) { | ||
} | ||
|
||
public static function insert(string $key): self | ||
{ | ||
return new self($key, 'insert'); | ||
} | ||
|
||
public static function update(string $key): self | ||
{ | ||
return new self($key, 'update'); | ||
} | ||
|
||
public static function upsert(string $key): self | ||
{ | ||
return new self($key, 'upsert'); | ||
} | ||
|
||
public function isUpdate(): bool | ||
{ | ||
return 'update' === $this->action; | ||
} | ||
|
||
public function isUpsert(): bool | ||
{ | ||
return 'upsert' === $this->action; | ||
} | ||
|
||
public function isInsert(): bool | ||
{ | ||
return 'insert' === $this->action; | ||
} | ||
} |
50 changes: 0 additions & 50 deletions
50
packages/mango/Scheduler/Messenger/ScheduledMessageMiddleware.php
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
packages/mango/Scheduler/Messenger/ScheduledMessageStamp.php
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.