random explosions ... remove later

This commit is contained in:
Sandy Walsh 2014-09-02 11:28:01 -03:00
parent f4839a6b28
commit 79a931fa1a

View File

@ -1,3 +1,5 @@
import random
import oahu.config
from oahu import debugging
from oahu import mongodb_driver as driver
@ -56,9 +58,12 @@ class EodExistsCallback(pipeline_callback.PipelineCallback):
print "EOD-Exists:", stream
#for event in stream.events:
# print event['timestamp'], event['event_type']
if random.choice([True, False]):
raise Exception("Trigger Exception %d" % random.randrange(100))
def commit(self, stream, scratchpad):
pass
if random.choice([True, False]):
raise Exception("Commit Exception %d" % random.randrange(100))
class Config(oahu.config.Config):