コード例 #1
0
    def __init__(self, msg, config):
        self.msg = msg
        self.config = config
        self.hgpushes = PulseHgPushes(config)
        self.max_checkins = 10
        self.shutting_down = False
        self.backout_delay = 600

        if (config.parser.has_option('bugzilla', 'server')
                and config.parser.has_option('bugzilla', 'api_key')):
            self.bugzilla = Bugzilla(config.bugzilla.server,
                                     config.bugzilla.api_key)

        if config.parser.has_option('pulse', 'max_checkins'):
            self.max_checkins = config.pulse.max_checkins

        if self.config.dispatch or self.config.bugzilla_branches:
            self.reporter_thread = threading.Thread(
                target=self.change_reporter)
            self.reporter_thread.start()

        if self.config.bugzilla_branches:
            self.bugzilla_queue = Queue(42)
            self.bugzilla_thread = threading.Thread(
                target=self.bugzilla_reporter)
            self.bugzilla_thread.start()
コード例 #2
0
    def __init__(self, config):
        self.config = config
        self.hgpushes = PulseHgPushes(config)
        self.max_checkins = 10
        self.shutting_down = False
        self.backout_delay = 600

        if config.bugzilla_server and config.bugzilla_api_key:
            self.bugzilla = Bugzilla(config.bugzilla_server,
                                     config.bugzilla_api_key)

        if config.pulse_max_checkins:
            self.max_checkins = config.pulse_max_checkins

        if self.config.bugzilla_branches:
            self.bugzilla_queue = Queue(42)
            self.bugzilla_thread = threading.Thread(
                target=self.bugzilla_reporter)
            self.bugzilla_thread.start()