Example #1
0
def main():
    logging.config.fileConfig(logfile_path(debug=False), disable_existing_loggers=False)

    if not features.ACTION_LOG_ROTATION or None in [SAVE_PATH, SAVE_LOCATION]:
        logger.debug("Action log rotation worker not enabled; skipping")
        while True:
            time.sleep(100000)

    GlobalLock.configure(app.config)
    worker = LogRotateWorker()
    worker.start()
Example #2
0
def main():
    logging.config.fileConfig(logfile_path(debug=False),
                              disable_existing_loggers=False)

    if app.config.get("ACCOUNT_RECOVERY_MODE", False):
        logger.debug("Quay running in account recovery mode")
        while True:
            time.sleep(100000)

    if not features.ACTION_LOG_ROTATION or None in [SAVE_PATH, SAVE_LOCATION]:
        logger.debug("Action log rotation worker not enabled; skipping")
        while True:
            time.sleep(100000)

    GlobalLock.configure(app.config)
    worker = LogRotateWorker()
    worker.start()
Example #3
0
def main():
    logging.config.fileConfig(logfile_path(debug=False),
                              disable_existing_loggers=False)

    if app.config.get("ACCOUNT_RECOVERY_MODE", False):
        logger.debug("Quay running in account recovery mode")
        while True:
            time.sleep(100000)

    if not app.config.get("PROMETHEUS_PUSHGATEWAY_URL"):
        logger.debug("Prometheus not enabled; skipping global stats reporting")
        while True:
            time.sleep(100000)

    GlobalLock.configure(app.config)
    worker = GlobalPrometheusStatsWorker()
    worker.start()
Example #4
0
    utilizing this method will enforce a 1:1 quay worker to gunicorn worker ratio.
    """
    gc_worker = NamespaceGCWorker(
        namespace_gc_queue,
        poll_period_seconds=POLL_PERIOD_SECONDS,
        reservation_seconds=NAMESPACE_GC_TIMEOUT,
    )
    worker = GunicornWorker(__name__, app, gc_worker,
                            features.NAMESPACE_GARBAGE_COLLECTION)
    return worker


if __name__ == "__main__":
    logging.config.fileConfig(logfile_path(debug=False),
                              disable_existing_loggers=False)

    if not features.NAMESPACE_GARBAGE_COLLECTION:
        logger.debug("Namespace garbage collection is disabled; skipping")
        while True:
            time.sleep(100000)

    GlobalLock.configure(app.config)
    logger.debug("Starting namespace GC worker")
    worker = NamespaceGCWorker(
        namespace_gc_queue,
        poll_period_seconds=POLL_PERIOD_SECONDS,
        reservation_seconds=NAMESPACE_GC_TIMEOUT,
    )
    worker.start()