Skip to content

Commit

Permalink
Remove error_log
Browse files Browse the repository at this point in the history
  • Loading branch information
johngodley committed Feb 8, 2015
1 parent 34adfbd commit fc1701b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions models/flusher.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ public function flush() {
$total += $this->expire_logs( $options['expire_redirect'] );
$total += $this->expire_404( $options['expire_404'] );

error_log('WPCRON: flushing '.$total);

if ( $total >= self::DELETE_MAX ) {
$next = time() + self::DELETE_KEEP_ON;

// There are still more logs to clear - keep on doing until we've clean or until the next normal event
if ( $next < wp_next_scheduled( self::DELETE_HOOK ) ) {
error_log('WPCRON: scheduling a single event '.date( 'Y-m-d H:i:s', time() + self::DELETE_KEEP_ON ));
wp_schedule_single_event( time() + ( self::DELETE_KEEP_ON * 60 ), self::DELETE_HOOK );
}
}
Expand Down

0 comments on commit fc1701b

Please sign in to comment.