mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-13 17:42:42 +08:00
resolved conflicts
This commit is contained in:
@@ -298,7 +298,7 @@ class Controller(object):
|
||||
# We break out of this loop if the time between
|
||||
# sending and receiving the heartbeat is more
|
||||
# than our poll period.
|
||||
|
||||
|
||||
if tic - self.ctime > self.period:
|
||||
log.info("heartbeat loop timedout: %s" % (tic - self.ctime))
|
||||
log.info(repr(self.responses))
|
||||
|
||||
@@ -221,6 +221,32 @@ class DivByZeroAlgorithm():
|
||||
def get_sid_filter(self):
|
||||
return [self.sid]
|
||||
|
||||
class TimeoutAlgorithm():
|
||||
|
||||
def __init__(self, sid):
|
||||
self.sid = sid
|
||||
self.incr = 0
|
||||
|
||||
def initialize(self):
|
||||
pass
|
||||
|
||||
def set_order(self, order_callable):
|
||||
pass
|
||||
|
||||
def set_logger(self, logger):
|
||||
pass
|
||||
|
||||
def set_portfolio(self, portfolio):
|
||||
pass
|
||||
|
||||
def handle_data(self, data):
|
||||
if self.incr > 4:
|
||||
import time
|
||||
time.sleep(100)
|
||||
pass
|
||||
|
||||
def get_sid_filter(self):
|
||||
return [self.sid]
|
||||
|
||||
class TestPrintAlgorithm():
|
||||
|
||||
|
||||
Reference in New Issue
Block a user