[wp-trac] [WordPress Trac] #20537: Don't spawn cron requests for suspended blogs

WordPress Trac noreply at wordpress.org
Mon Jul 4 14:15:15 UTC 2016


#20537: Don't spawn cron requests for suspended blogs
-------------------------------------------------+-------------------------
 Reporter:  ryan                                 |       Owner:  jrf
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  4.6
Component:  Cron API                             |     Version:  3.3.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch good-first-bug needs-      |     Focuses:  multisite
  testing                                        |
-------------------------------------------------+-------------------------

Comment (by flixos90):

 Replying to [comment:15 jeremyfelt]:
 > It feels a little weird to either pass `null` or a `WP_Site` instance,
 but that might be all we have.

 Looking at this, I think it would probably make sense to only run this
 filter on a Multisite setup and otherwise always have `$spawn_cron` set to
 true. This way we can always pass a `WP_Site` instance, and on a single
 site, having a filter like this doesn't sound useful to me (as you could
 just `DISABLE_WP_CRON` there).

 Replying to [comment:16 jrf]:
 > In `src/wp-cron.php` you need to change `true` to `false` in the
 following line:

 Yep - we all make mistakes. :)

 Another minor update needed, let's use `get_site()` instead of
 `get_blog_details()`, now that that function is available.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/20537#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list