Feature: Updating Listreners, Separating Logic from listeners, Queuing Policies

This commit is contained in:
2026-09-16 23:24:02 +03:00
parent a411e6bbc1
commit a55697ce82
25 changed files with 445 additions and 163 deletions
@@ -2,6 +2,7 @@
namespace Modules\Core\Payment\Listeners;
use Illuminate\Contracts\Queue\ShouldQueue;
use Modules\Core\Logging\ActivityLogService;
use Modules\Core\Payment\Events\PaymentMethodCreated;
use Modules\Core\Payment\Events\PaymentMethodDeleted;
@@ -9,6 +10,8 @@ use Modules\Core\Payment\Events\PaymentMethodUpdated;
use Modules\Core\Payment\Models\PaymentMethod;
/**
* Queued — a pure audit-log write with no same-request reader.
*
* Same pattern as Localization\Listeners\LogTranslationActivity — routes
* PaymentMethodService's own events through the existing
* Logging\ActivityLogService instead of PaymentMethod separately opting
@@ -29,7 +32,7 @@ use Modules\Core\Payment\Models\PaymentMethod;
* forcing into a one-subject shape or adding a new method to the shared
* service for.
*/
class LogPaymentMethodActivity
class LogPaymentMethodActivity implements ShouldQueue
{
public function __construct(
private readonly ActivityLogService $activityLog,