-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DE-111852 Improve observability events (provide before & after) (#101)
- Loading branch information
1 parent
237c9bd
commit faeab36
Showing
7 changed files
with
210 additions
and
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace BE\QueueManagement\Observability; | ||
|
||
use BE\QueueManagement\Jobs\JobInterface; | ||
use Ramsey\Uuid\UuidInterface; | ||
|
||
class AfterExecutionPlannedEvent | ||
{ | ||
/** | ||
* @param UuidInterface $executionPlannedId Same id is used for BeforeExecutionPlannedEvent and AfterExecutionPlannedEvent | ||
*/ | ||
public function __construct( | ||
public readonly UuidInterface $executionPlannedId, | ||
public readonly JobInterface $job, | ||
public readonly string $prefixedQueueName, | ||
public readonly int $delayInSeconds, | ||
public readonly PlannedExecutionStrategyEnum $plannedExecutionStrategy, | ||
public readonly ?string $scheduledEventId, | ||
public readonly ?string $messageId, | ||
) { | ||
} | ||
} |
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,21 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace BE\QueueManagement\Observability; | ||
|
||
use BE\QueueManagement\Jobs\JobInterface; | ||
use Ramsey\Uuid\UuidInterface; | ||
|
||
class BeforeExecutionPlannedEvent | ||
{ | ||
/** | ||
* @param UuidInterface $executionPlannedId Same id is used for BeforeExecutionPlannedEvent and AfterExecutionPlannedEvent | ||
*/ | ||
public function __construct( | ||
public readonly UuidInterface $executionPlannedId, | ||
public readonly JobInterface $job, | ||
public readonly string $prefixedQueueName, | ||
public readonly int $delayInSeconds, | ||
public readonly PlannedExecutionStrategyEnum $plannedExecutionStrategy, | ||
) { | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace BE\QueueManagement\Observability; | ||
|
||
enum PlannedExecutionStrategyEnum: string | ||
{ | ||
case SQS_DELIVERY_DELAY = 'SQS_DELIVERY_DELAY'; | ||
|
||
case DELAYED_JOB_SCHEDULER = 'DELAYED_JOB_SCHEDULER'; | ||
} |
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
Oops, something went wrong.