Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#39828 closed defect (bug) (fixed)

Multiple do_pings events shouldn't be scheduled

Reported by: ethitter Owned by: SergeyBiryukov
Priority: normal Milestone: 4.8
Component: Pings/Trackbacks Version: 2.0.1
Severity: normal Keywords:
Cc: Focuses:

Description

Whenever _publish_post_hook() is called, a new do_pings event is scheduled in wp-cron. Since do_all_pings() (the callback hooked to do_pings by default) takes no arguments, and pings everything that needs pinging each time it runs, there's no need to schedule multiple of these events.

The potential for duplicate events has existed since its introduction in r3663. As part of #6966, r9181 aimed to reduce duplicate events. If a site's cron is backlogged, however, that workaround will fail as it only looks ahead.

Attachments (1)

39828.diff (474 bytes ) - added by ethitter 9 years ago.
Only schedule an event if one doesn't exist

Download all attachments as: .zip

Change History (3)

@ethitter
9 years ago

Only schedule an event if one doesn't exist

#1 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review4.8

#2 @SergeyBiryukov
9 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 40054:

Pings/Trackbacks: Avoid scheduling multiple do_pings events in _publish_post_hook().

Props ethitter.
Fixes #39828.

Note: See TracTickets for help on using tickets.