def push(id, body, wallets, log, lifetime: 6)
      DirItems.new(@dir).fetch.each do |f|
        f = File.join(@dir, f)
        File.delete(f) if File.mtime(f) < Time.now - lifetime * 60 * 60
      end
      journal = File.join(@dir, "#{Time.now.utc.iso8601.gsub(/[^0-9]/, '-')}-#{id}")
      jlog = Logger.new(journal)
      jlog.level = Logger::DEBUG
      jlog.formatter = Log::COMPACT
      jlog.info("push(#{id}, #{body.length} bytes): starting...")
      jlog.info("Time: #{Time.now.utc.iso8601}")
      jlog.info("Zold gem version: #{Zold::VERSION}")
      modified = @pipeline.push(id, body, JournaledPipeline::Wallets.new(wallets, jlog), Log::Tee.new(log, jlog))
      jlog.info("push(#{id}): done")
      FileUtils.mv(journal, journal + '-done')
      modified
    end
def push(id, body, wallets, log, lifetime: 6)
      DirItems.new(@dir).fetch.each do |f|
        f = File.join(@dir, f)
        File.delete(f) if File.mtime(f) < Time.now - lifetime * 60 * 60
      end
      journal = File.join(@dir, "
      jlog = Logger.new(journal)
      jlog.level = Logger::DEBUG
      jlog.formatter = Log::COMPACT
      jlog.info("push(
      jlog.info("Time: 
      jlog.info("Zold gem version: 
      modified = @pipeline.push(id, body, JournaledPipeline::Wallets.new(wallets, jlog), Log::Tee.new(log, jlog))
      jlog.info("push(
      FileUtils.mv(journal, journal + '-done')
      modified
    end
def push ( id , body , wallets , log , lifetime : 6 ) DirItems . new ( @dir ) . fetch . each do | f | f = File . join ( @dir , f ) File . delete ( f ) if File . mtime ( f ) < Time . now - lifetime * 60 * 60 end journal = File . join ( @dir , "#{Time.now.utc.iso8601.gsub(/[^0-9]/, '-')}-#{id}" ) jlog = Logger . new ( journal ) jlog . level = Logger :: DEBUG jlog . formatter = Log :: COMPACT jlog . info ( "push(#{id}, #{body.length} bytes): starting..." ) jlog . info ( "Time: #{Time.now.utc.iso8601}" ) jlog . info ( "Zold gem version: #{Zold::VERSION}" ) modified = @pipeline . push ( id , body , JournaledPipeline :: Wallets . new ( wallets , jlog ) , Log :: Tee . new ( log , jlog ) ) jlog . info ( "push(#{id}): done" ) FileUtils . mv ( journal , journal + '-done' ) modified end
Returns a list of modifed wallets (as Zold::Id)
Returns a list of modifed wallets ( as Zold :: Id )