Sha256: 8c828a66b5b91f2e459bcf66504ef5b5e7ccbe86b44426966e72eaddfa328105
Contents?: true
Size: 647 Bytes
Versions: 1
Compression:
Stored size: 647 Bytes
Contents
module Typhoeus class Hydra def run_with_logging log = LazyResource.debug && LazyResource.logger && @multi.items_queued_but_not_running? if log LazyResource.logger.info "Processing requests:" start_time = Time.now end run_without_logging if log LazyResource.logger.info "Requests processed in #{((Time.now - start_time) * 1000).ceil}ms" end end alias_method :run_without_logging, :run alias_method :run, :run_with_logging end end module Ethon class Multi def items_queued_but_not_running? easy_handles.size > 0 && running_count <= 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lazy_resource-0.4.0 | lib/lazy_resource/ext/typhoeus.rb |