
Untitled
By: a guest on
Aug 1st, 2012 | syntax:
None | size: 0.75 KB | hits: 9 | expires: Never
inserter=GenericInserter.new( OPTS[:servers], OPTS[:port], OPTS[:debug] )
distiller=Distiller.new( inserter.id, OPTS )
differ=Differ.new( OPTS[:template], OPTS[:crashfile] )
differ.each_change {|change|
data=distiller.apply_change( change )
pdu={
'command'=>COMMAND,
'extension'=>EXTENSION,
'data'=>data,
'output_tube'=>'', # bot will not send beanstalk output
'delivery_options'=>{}
}
inserter.insert( pdu )
classification=distiller.classify_change( distiller.next_result )
unless classification=='N'
# Some kind of trigger - revert this change!
distiller.revert_last_change( classification )
end
}
puts "Results:"
distiller.reverted.each {|change| p change}