コード例 #1
0
 def __init__(self,
              actor_config,
              host="localhost",
              port=6379,
              database=0,
              queue="wishbone.out",
              key="",
              native_events=False,
              payload=None,
              parallel_streams=1,
              selection="@data",
              rpush=False):
     """Output module to redis database."""
     OutputModule.__init__(self, actor_config)
     self.redis_host = host
     self.redis_port = port
     self.redis_db = database
     self.queue = queue
     self.key = key
     self.selection = selection
     self.conn = None
     self.rpush = rpush
     self.pushcmd = None
     self.pool.createQueue("inbox")
     self.registerConsumer(self.consume, "inbox")
コード例 #2
0
ファイル: stdout.py プロジェクト: smetj/wishbone
    def __init__(self, actor_config,
                 selection=None, payload=None, native_events=False, parallel_streams=1,
                 counter=False, prefix="", pid=False, colorize=False,
                 foreground_color="WHITE", background_color="RESET", color_style="NORMAL"):
        OutputModule.__init__(self, actor_config)

        self.__validateInput(foreground_color, background_color, color_style)
        self.pool.createQueue("inbox")
        self.registerConsumer(self.consume, "inbox")

        self.ansi_escape = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')
コード例 #3
0
 def __init__(self,
              actor_config,
              selection="data",
              native_events=False,
              parallel_streams=1,
              mode="server",
              payload=None,
              interface="0.0.0.0",
              port=19283):
     OutputModule.__init__(self, actor_config)
     self.pool.createQueue("inbox")
     self.registerConsumer(self.consume, "inbox")
コード例 #4
0
 def __init__(self,
              actor_config,
              couchdb_url,
              payload=None,
              selection="data",
              parallel_streams=1,
              native_events=False,
              **kw):
     OutputModule.__init__(self, actor_config)
     self.pool.createQueue("inbox")
     self.registerConsumer(self.consume, "inbox")
     self.couchdb = Database(couchdb_url)
コード例 #5
0
 def __init__(self,
              actor_config,
              selection="data",
              payload=None,
              parallel_streams=1,
              native_events=False,
              hosts=["localhost:9200"],
              use_ssl=False,
              verify_certs=False,
              index="wishbone",
              doc_type="wishbone"):
     OutputModule.__init__(self, actor_config)
     self.pool.createQueue("inbox")
     self.registerConsumer(self.consume, "inbox")
コード例 #6
0
 def __init__(
         self,
         actor_config,
         selection="data",
         payload=None,
         parallel_streams=1,
         native_events=False,
         hosts=["localhost:9200"],
         use_ssl=False,
         verify_certs=False,
         index="wishbone",
         doc_type="wishbone"):
     OutputModule.__init__(self, actor_config)
     self.pool.createQueue("inbox")
     self.registerConsumer(self.consume, "inbox")
コード例 #7
0
ファイル: amqpout.py プロジェクト: smetj/wishbone-output-amqp
    def __init__(self, actor_config, native_events=False, selection="data", payload=None, parallel_streams=1,
                 host="localhost:5672", vhost="/", user="******", password="******", ssl=False, heartbeat=0,
                 exchange="wishbone", exchange_type="direct", exchange_durable=False, exchange_auto_delete=True, exchange_passive=False,
                 exchange_arguments={},
                 queue="wishbone", queue_durable=False, queue_exclusive=False, queue_auto_delete=True, queue_declare=True,
                 queue_arguments={},
                 routing_key="", delivery_mode=1):

        OutputModule.__init__(self, actor_config)

        self.pool.createQueue("inbox")
        self.registerConsumer(self.consume, "inbox")

        self.connect = Event()
        self.connect.set()

        self.do_consume = Event()
        self.do_consume.clear()

        self.channel = None

        self.connected = False
コード例 #8
0
    def __init__(self,
                 actor_config,
                 selection="data",
                 payload=None,
                 native_events=False,
                 parallel_streams=1,
                 account_name="wishbone",
                 account_key="wishbone",
                 queue_name="wishbone",
                 endpoint_suffix='core.windows.net',
                 visibility_timeout=0,
                 time_to_live=0,
                 b64encode=True):

        OutputModule.__init__(self, actor_config)
        self.pool.createQueue("inbox")

        self.decode = Plain().handler

        self.__connect = Event()
        self.__connect.set()

        self.__submit = Event()
        self.__submit.clear()