def publish_bar_signal(self):
    dt_list = []
    while True:
        d = self._trigger_queue.get()
        dt_list.append(d)
        print(d)
        if ((len(dt_list) >= len(self._resample_thread)) or (dt.datetime.now() > (d + dt.timedelta(seconds=2)))):
            self.trigger_socket.send_pyobj(d)
            dt_list.clear()
def publish_bar_signal(self):
    dt_list = []
    while True:
        d = self._trigger_queue.get()
        dt_list.append(d)
        print(d)
        if ((len(dt_list) >= len(self._resample_thread)) or (dt.datetime.now() > (d + dt.timedelta(seconds=2)))):
            self.trigger_socket.send_pyobj(d)
            dt_list.clear()