Change remote-controlled features request to be cron-based #4856
Labels
P0
High priority
QA: Eng
Requires specialized QA by an engineer
Type: Enhancement
Improvement of an existing feature
In order to run the
/site-management/features/
request more regularly, it should be changed to be primarily invoked in a (WP) cron-job. Only if for whatever reason no data is set yet (e.g. right after connecting to the service), the request should be issued on demand.This is part of a set of 2 issues (and related service enhancements) to make the check more flexible and provide additional criteria for whether to enable a feature or not.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
twicedaily
.Authentication::filter_features_via_proxy
method can probably remain as is - it will most likely not invoke the request though since the data in most situations will already have been populated via the cron hook.Implementation Brief
Within
includes/Core/Authentication/Authentication.php
:filter_features_via_proxy
into a new function, called e.g.get_transient_features
.site-kit-wp/includes/Core/Authentication/Authentication.php
Lines 1321 to 1334 in f584517
register
method, use thewp_schedule_event
WP API function to schedule atwicedaily
call toget_transient_features
.Test Coverage
QA Brief
get_transient_features
.Changelog entry
The text was updated successfully, but these errors were encountered: