Permalink
Browse files

Use shorter refresh interval when debugging

  • Loading branch information...
1 parent 76a8a72 commit 7af87b5dbb69aa4e7f31a89a98c299abb837fa67 @nb nb committed Dec 28, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 liveblog.php
View
@@ -42,6 +42,7 @@
const nonce_key = 'liveblog_nonce';
const refresh_interval = 10; // how often should we refresh
+ const debug_refresh_interval = 2; // how often we refresh in development mode
const max_consecutive_retries = 100; // max number of failed tries before polling is disabled
const delay_threshold = 5; // how many failed tries after which we should increase the refresh interval
const delay_multiplier = 2; // by how much should we inscrease the refresh interval
@@ -467,7 +468,7 @@ public static function enqueue_scripts() {
'nonce_key' => self::nonce_key,
'latest_entry_timestamp' => self::$entry_query->get_latest_timestamp(),
- 'refresh_interval' => self::refresh_interval,
+ 'refresh_interval' => WP_DEBUG? self::debug_refresh_interval : self::refresh_interval,
'max_consecutive_retries'=> self::max_consecutive_retries,
'delay_threshold' => self::delay_threshold,
'delay_multiplier' => self::delay_multiplier,

0 comments on commit 7af87b5

Please sign in to comment.