def handle(self, *args, **options):
        if env.bool('SKIP_INGESTION', default=False):
            self.stdout.write("Skipping ingestion of Pulse Pushes")
            return
        # Specifies the Pulse services from which Treeherder will ingest push
        # information.  Sources can include properties `hgmo`, `github`, or both, to
        # listen to events from those sources.  The value is a JSON array of the form
        # [{pulse_url: .., hgmo: true, root_url: ..}, ..]
        push_sources = env.json(
            "PULSE_PUSH_SOURCES",
            default=[{
                "root_url": "https://firefox-ci-tc.services.mozilla.com",
                "github": True,
                "hgmo": True,
                "pulse_url": env("PULSE_URL"),
            }],
        )

        consumers = prepare_consumers(
            PushConsumer,
            push_sources,
        )

        try:
            consumers.run()
        except KeyboardInterrupt:
            pass
        self.stdout.write("Pulse Push listening stopped...")
Пример #2
0
    def handle(self, *args, **options):
        if env.bool('SKIP_INGESTION', default=False):
            self.stdout.write("Skipping ingestion of Pulse Tasks")
            return
        # Specifies the Pulse services from which Treeherder will consume task
        # information.  This value is a JSON array of the form [{pulse_url: ..,
        # root_url: ..}, ..]
        task_sources = env.json(
            "PULSE_TASK_SOURCES",
            default=[{
                "root_url": "https://firefox-ci-tc.services.mozilla.com",
                "pulse_url": env("PULSE_URL"),
            }],
        )

        consumers = prepare_consumers(
            TaskConsumer,
            task_sources,
            lambda key: "#.{}".format(key),
        )

        try:
            consumers.run()
        except KeyboardInterrupt:
            pass
        self.stdout.write("Pulse Task listening stopped...")
Пример #3
0
    def handle(self, *args, **options):
        # Specifies the Pulse services from which Treeherder will consume task
        # information.  This value is a JSON array of the form [{pulse_url: ..,
        # root_url: ..}, ..]
        task_sources = env.json("PULSE_TASK_SOURCES", default=[])

        consumers = prepare_consumers(
            TaskConsumer,
            task_sources,
            lambda key: "#.{}".format(key),
        )

        try:
            consumers.run()
        except KeyboardInterrupt:
            pass
        self.stdout.write("Pulse Task listening stopped...")
Пример #4
0
    def handle(self, *args, **options):
        # Specifies the Pulse services from which Treeherder will ingest push
        # information.  Sources can include properties `hgmo`, `github`, or both, to
        # listen to events from those sources.  The value is a JSON array of the form
        # [{pulse_url: .., hgmo: true, root_url: ..}, ..]
        push_sources = env.json('PULSE_PUSH_SOURCES', default=[])

        consumers = prepare_consumers(
            PushConsumer,
            push_sources,
        )

        try:
            consumers.run()
        except KeyboardInterrupt:
            pass
        self.stdout.write("Pulse Push listening stopped...")