Add incremental health check for feed retrieval cron jobs #1231
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feeds can lose their retrieval cron jobs due to various failures (cron issues, server restarts, database problems). This adds a lightweight, non-cron-based health check that ensures all feeds have scheduled retrieval jobs.
Implementation
init(priority 20) once per hour, throttled by timestamppf_feed_cron_check_batch_size)pf_feed_cron_check_offsetto track position across runsExample flow for 250 feeds
Key decisions
inithook instead of cron to avoid duplicate point of failureWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/DaveChild/Text-Statistics/zipball/e83d5f82726db80e662ae305fce3b3c41299b4f5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/2d1b63db139c3c6ea0c927698e5160f8b3b8d630/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/K51SEl /usr/bin/composer install --quiet or/psr/log user.name(http block)https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/K51SEl /usr/bin/composer install --quiet or/psr/log user.name(http block)https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/K51SEl /usr/bin/composer install --quiet or/psr/log user.name(http block)https://api.github.com/repos/firebase/php-jwt/zipball/8f718f4dfc9c5d5f0c994cdfd103921b43592712/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)https://api.github.com/repos/fivefilters/readability.php/zipball/2fd58a6cc626124a05721efb9b3632e91783d487/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)https://api.github.com/repos/mattwright/URLResolver.php/zipball/416039192cb6d9158bdacd68349bceff8739b857/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/K51SEl /usr/bin/composer install --quiet or/psr/log user.name(http block)https://api.github.com/repos/phpstan/phpstan/zipball/29201e7a743a6ab36f91394eab51889a82631428/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/K51SEl /usr/bin/composer install --quiet or/psr/log user.name(http block)https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/K51SEl /usr/bin/composer install --quiet or/psr/log user.name(http block)https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/K51SEl /usr/bin/composer install --quiet or/psr/log user.name(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/K51SEl /usr/bin/composer install --quiet or/psr/log user.name(http block)https://api.github.com/repos/simplehtmldom/simplehtmldom/zipball/3c87726400e59d8e1bc4709cfe82353abeb0f4d1/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)https://api.github.com/repos/thephpleague/uri/zipball/09da64118eaf4c5d52f9923a1e6a5be1da52fd9a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/EQ0xmC /usr/bin/composer install --no-dev --quiet(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.