Пример #1
0
 def handle_transaction(self, stream_id, emit):
     entry = make_payload(emit)
     entry['stream_id'] = stream_id
     self.storage_cache.cache(entry)
     self.logger.info("End of Transaction")
     self.counter.read()
     self.counter.update()
Пример #2
0
    def e_trans_impl(state, config, data):
        try:
            if "match_all" in state: del _state[state.match_all]
            if "data" in state:
                state.data.append(data)
                storage_cache.cache(make_payload(format_data(state.data)))
                del state["data"]
                logger.info("End of Transaction")
                config.counter.read()
                config.counter.update()
        except Exception, e:
            import traceback

            traceback.print_exc()
            config.counter.error()