class Fbe::Conclude
def roll(&)
-
(Integer)
- The count of facts processed
Other tags:
- Yield: - Transaction and the matching fact
def roll(&) passed = 0 start = @time.now oct = Fbe.octo(loog: @loog, options: @options, global: @global) @fb.query(@query).each do |a| if @quota_aware && oct.off_quota? @loog.debug('We ran out of GitHub quota, must stop here') break end now = @time.now if now > start + @timeout @loog.debug("We've spent more than #{start.ago}, must stop here") break end @fb.txn do |fbt| n = yield fbt, a @loog.info("#{n.what}: #{n.details}") unless n.nil? end passed += 1 end @loog.debug("Found and processed #{passed} facts by: #{@query}") passed end