Example #1
0
                                    data_manager)
        t_ws = Thread(name='scanner', target=ws_server.start_server)
        t_ws.daemon = False
        t_ws.start()

        # init jobprocessor
        device_Updater = deviceUpdater(ws_server, args, jobstatus)

        webhook_worker = None
        if args.webhook:
            from webhook.webhookworker import WebhookWorker

            rarity = Rarity(args, db_wrapper)
            rarity.start_dynamic_rarity()

            webhook_worker = WebhookWorker(args, data_manager, mapping_manager,
                                           rarity, db_wrapper.webhook_reader)
            t_whw = Thread(name="webhook_worker",
                           target=webhook_worker.run_worker)
            t_whw.daemon = True
            t_whw.start()

    if args.statistic:
        if args.only_scan:
            logger.info("Starting statistics collector")
            t_usage = Thread(name='system',
                             target=get_system_infos,
                             args=(db_wrapper, ))
            t_usage.daemon = True
            t_usage.start()

    if args.with_madmin:
Example #2
0
                                        mapping_manager, pogoWindowManager)
            t_ws = Thread(name='scanner', target=ws_server.start_server)
            t_ws.daemon = False
            t_ws.start()

            # init jobprocessor
            device_Updater = deviceUpdater(ws_server, args, jobstatus)

            webhook_worker = None
            if args.webhook:
                from webhook.webhookworker import WebhookWorker

                rarity = Rarity(args, db_wrapper)
                rarity.start_dynamic_rarity()

                webhook_worker = WebhookWorker(args, db_wrapper,
                                               mapping_manager, rarity)
                t_whw = Thread(name="webhook_worker",
                               target=webhook_worker.run_worker)
                t_whw.daemon = True
                t_whw.start()

    if args.statistic:
        if args.only_scan:
            logger.info("Starting statistics collector")
            t_usage = Thread(name='system',
                             target=get_system_infos,
                             args=(db_wrapper, ))
            t_usage.daemon = True
            t_usage.start()

    if args.with_madmin:
Example #3
0
            logger.info('Starting scanner')
            ws_server = WebsocketServer(args, mitm_mapper, db_wrapper,
                                        routemanagers, device_mappings, auths, pogoWindowManager)
            t_ws = Thread(name='scanner', target=ws_server.start_server)
            t_ws.daemon = False
            t_ws.start()

            webhook_worker = None
            if args.webhook:
                from webhook.webhookworker import WebhookWorker

                rarity = Rarity(args, db_wrapper)
                rarity.start_dynamic_rarity()

                webhook_worker = WebhookWorker(
                    args, db_wrapper, routemanagers, rarity)
                t_whw = Thread(name="webhook_worker",
                               target=webhook_worker.run_worker)
                t_whw.daemon = False
                t_whw.start()

            logger.info("Starting file watcher for mappings.json changes.")
            t_file_watcher = Thread(name='file_watcher', target=file_watcher,
                                    args=(db_wrapper, mitm_mapper, ws_server, webhook_worker))
            t_file_watcher.daemon = False
            t_file_watcher.start()

    if args.only_ocr:
        from ocr.copyMons import MonRaidImages

        MonRaidImages.runAll(args.pogoasset, db_wrapper=db_wrapper)