YUKI Hiroshi
null+****@clear*****
Fri Nov 1 16:42:49 JST 2013
YUKI Hiroshi 2013-11-01 16:42:49 +0900 (Fri, 01 Nov 2013) New Revision: 4b7b5d1e1f8e21a62d300c387413b1a95dcfa47f https://github.com/droonga/fluent-plugin-droonga/commit/4b7b5d1e1f8e21a62d300c387413b1a95dcfa47f Message: Remove codes to run garbage collection periodically Modified files: lib/droonga/sweeper.rb Modified: lib/droonga/sweeper.rb (+0 -13) =================================================================== --- lib/droonga/sweeper.rb 2013-11-01 16:21:49 +0900 (48dcfde) +++ lib/droonga/sweeper.rb 2013-11-01 16:42:49 +0900 (d9fe60e) @@ -17,25 +17,12 @@ module Droonga class Sweeper - PERIODICAL_SWEEP_INTERVAL_SECONDS = 20 * 60 # 20 min SUBSCRIBER_LIFETIME_SECONDS = 10 * 60 # 10 min def initialize(context) @context = context end - def activate_periodical_sweep(options={}) - interval = options[:interval] || PERIODICAL_SWEEP_INTERVAL_SECONDS - # XXX this should be re-implemented with more better way - # because the thread is never stopped. - @sweeper_thread = Thread.new do - while true - sweep_expired_subscribers - sleep(interval) - end - end - end - def sweep_expired_subscribers(options={}) now = options[:now] || Time.now boundary = now - SUBSCRIBER_LIFETIME_SECONDS -------------- next part -------------- HTML����������������������������...Download