fixup for new oahu naming
This commit is contained in:
parent
d62aed948e
commit
402cb38c64
@ -1,30 +1,30 @@
|
|||||||
import oahu.config
|
import oahu.config
|
||||||
from oahu import mongodb_sync_engine as driver
|
from oahu import mongodb_driver as driver
|
||||||
from oahu import pipeline
|
from oahu import trigger_definition
|
||||||
from oahu import stream_rules
|
from oahu import pipeline_callback
|
||||||
from oahu import trigger_callback
|
from oahu import criteria
|
||||||
from oahu import trigger_rule
|
|
||||||
|
|
||||||
|
|
||||||
class Callback(object):
|
class Callback(pipeline_callback.PipelineCallback):
|
||||||
def on_trigger(self, stream):
|
def on_trigger(self, stream):
|
||||||
print "Processing", stream
|
print "Processing", stream
|
||||||
|
|
||||||
|
|
||||||
class Config(oahu.config.Config):
|
class Config(oahu.config.Config):
|
||||||
def get_sync_engine(self, callback=None):
|
def get_driver(self, callback=None):
|
||||||
inactive = trigger_rule.Inactive(60)
|
inactive = criteria.Inactive(60)
|
||||||
rule_id = "request-id" # Has to be consistent across yagi workers.
|
trigger_name = "request-id" # Has to be consistent across yagi workers.
|
||||||
if not callback:
|
if not callback:
|
||||||
self.callback = Callback()
|
self.callback = Callback()
|
||||||
else:
|
else:
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
by_request = stream_rules.StreamRule(rule_id,
|
by_request = trigger_definition.TriggerDefinition(trigger_name,
|
||||||
["request_id", ],
|
["request_id", ],
|
||||||
inactive, self.callback)
|
inactive,
|
||||||
rules = [by_request, ]
|
self.callback)
|
||||||
|
triggers = [by_request, ]
|
||||||
|
|
||||||
return driver.MongoDBSyncEngine(rules)
|
return driver.MongoDBDriver(triggers)
|
||||||
|
|
||||||
def get_ready_chunk_size(self):
|
def get_ready_chunk_size(self):
|
||||||
return 100
|
return 100
|
||||||
|
4
screenrc
4
screenrc
@ -1,7 +1,7 @@
|
|||||||
sessionname tach
|
sessionname tach
|
||||||
hardstatus alwayslastline '%{= .} %-Lw%{= .}%> %n%f %t*%{= .}%+Lw%< %-=%{g}(%{d}%H/%l%{g})'
|
hardstatus alwayslastline '%{= .} %-Lw%{= .}%> %n%f %t*%{= .}%+Lw%< %-=%{g}(%{d}%H/%l%{g})'
|
||||||
#screen -t gen bash
|
screen -t gen bash
|
||||||
#stuff "cd git/notigen/bin; python event_pump.py\r"
|
stuff "cd git/notigen/bin; python event_pump.py\r"
|
||||||
screen -t yagi1 bash
|
screen -t yagi1 bash
|
||||||
stuff "cd git/yagi/bin; ./yagi-event --config ../../../shoebox.conf\r"
|
stuff "cd git/yagi/bin; ./yagi-event --config ../../../shoebox.conf\r"
|
||||||
screen -t yagi2 bash
|
screen -t yagi2 bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user