[buddypress-trac] [BuddyPress Trac] #7904: Akismet cleanup cron job should not be scheduled on secondary sites

buddypress-trac noreply at wordpress.org
Thu Jun 14 16:35:26 UTC 2018


#7904: Akismet cleanup cron job should not be scheduled on secondary sites
--------------------------+----------------------------------------
 Reporter:  boonebgorges  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.0
Component:  Activity      |    Version:
 Severity:  normal        |   Keywords:  needs-patch good-first-bug
--------------------------+----------------------------------------
 Currently, it's possible for `BP_Akismet::check_activity()` to run on a
 non-root blog (as in the case of blog comments). This triggers
 `send_akismet_request()`, and at the end of that method, there's a call to
 `wp_schedule_event()`. As a result, the metadata-cleanup routine
 `bp_activity_akismet_delete_old_metadata` can get scheduled across many
 sites in the network. This is unnecessary.

 I think the right technique is probably to switch to the root blog before
 scheduling the event.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7904>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list