WordPress.org

Making WordPress.org

Changeset 4285


Ignore:
Timestamp:
10/21/2016 09:12:32 PM (4 years ago)
Author:
iandunn
Message:

WordCamp Site Cloner: Lower sites query limit to 250 to avoid transient bug

See #1112

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-site-cloner/wordcamp-site-cloner.php

    r4280 r4285  
    184184 * This is called via WP Cron.
    185185 *
    186  * @todo - Reintroduce batching from `1112.3.diff` to get more than 500 sites
     186 * @todo - Reintroduce batching from `1112.3.diff` to get more than 500 sites. Will need to fix transient bug
     187 * mentioned in `get_wordcamp_sites()` first.
    187188 */
    188189function prime_wordcamp_sites() {
     
    217218
    218219    $wordcamp_query = new \WP_Query( array(
     220        /*
     221         * todo - There's a bug where a `posts_per_page` value greater than ~250-300 will result in
     222         * `set_site_transient()` calling `add_site_option()` rather than `update_site_option()`,
     223         * and then `get_site_transient()` fails, so `sites_endpoint()` returns an empty array.
     224         */
    219225        'post_type'      => WCPT_POST_TYPE_ID,
    220226        'post_status'    => \WordCamp_Loader::get_public_post_statuses(),
    221         'posts_per_page' => 500,
     227        'posts_per_page' => 250,
    222228        'meta_key'       => 'Start Date (YYYY-mm-dd)',
    223229        'orderby'        => 'meta_value_num',
Note: See TracChangeset for help on using the changeset viewer.