feat: add internal rate limit for rdap queries

This commit is contained in:
Maël Gangloff
2025-10-28 12:09:38 +01:00
parent 12c1a9bb97
commit 98d92ce8f8
17 changed files with 203 additions and 92 deletions

View File

@@ -2,15 +2,15 @@
namespace App\Scheduler;
use App\Message\ProcessWatchlistTrigger;
use App\Message\ProcessAllWatchlist;
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('notif_watchlist')]
final readonly class SendNotifWatchlistTriggerSchedule implements ScheduleProviderInterface
#[AsSchedule('process_watchlist')]
final readonly class ProcessWatchlistSchedule implements ScheduleProviderInterface
{
public function __construct(
private CacheInterface $cache,
@@ -21,7 +21,7 @@ final readonly class SendNotifWatchlistTriggerSchedule implements ScheduleProvid
{
return (new Schedule())
->add(
RecurringMessage::every('5 minutes', new ProcessWatchlistTrigger()),
RecurringMessage::every('5 minutes', new ProcessAllWatchlist()),
)
->stateful($this->cache);
}