settings: Add queue for repositories
This commit is contained in:
@@ -32,13 +32,14 @@ If you want to opt out of PRs like this or want to provide feedback, please cont
|
|||||||
RABBIT_HOST = os.getenv("RABBIT_HOST", "127.0.0.1")
|
RABBIT_HOST = os.getenv("RABBIT_HOST", "127.0.0.1")
|
||||||
RABBIT_PORT = int(os.getenv("RABBIT_PORT", 5672))
|
RABBIT_PORT = int(os.getenv("RABBIT_PORT", 5672))
|
||||||
RABBIT_CREDENTIALS = ("alex", "testtest")
|
RABBIT_CREDENTIALS = ("alex", "testtest")
|
||||||
_RABBIT_BASE_QUEUE = "tasks.analyze"
|
_RABBIT_BASE_TASK_QUEUE = "tasks.analyze"
|
||||||
RABBIT_TASK_QUEUE = _RABBIT_BASE_QUEUE + ".in"
|
RABBIT_TASK_QUEUE = _RABBIT_BASE_TASK_QUEUE + ".in"
|
||||||
RABBIT_REPLY_QUEUE = _RABBIT_BASE_QUEUE + ".out"
|
RABBIT_REPLY_QUEUE = _RABBIT_BASE_TASK_QUEUE + ".out"
|
||||||
|
RABBIT_REPOSITORY_QUEUE = "github.repositories"
|
||||||
|
|
||||||
LOGGING_FORMAT = "%(asctime)s.%(msecs)03d %(levelname)s %(module)s: %(message)s"
|
LOGGING_FORMAT = "%(asctime)s.%(msecs)03d %(levelname)s %(module)s: %(message)s"
|
||||||
LOGGING_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
|
LOGGING_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
|
||||||
LOGS_PATH = '/var/log/assets-bot'
|
LOGS_PATH = "/var/log/assets-bot"
|
||||||
|
|
||||||
|
|
||||||
def init_logging():
|
def init_logging():
|
||||||
@@ -46,8 +47,7 @@ def init_logging():
|
|||||||
logging.basicConfig(format=LOGGING_FORMAT, datefmt=LOGGING_DATE_FORMAT, level=logging.INFO)
|
logging.basicConfig(format=LOGGING_FORMAT, datefmt=LOGGING_DATE_FORMAT, level=logging.INFO)
|
||||||
else:
|
else:
|
||||||
out_path = os.path.join(
|
out_path = os.path.join(
|
||||||
LOGS_PATH,
|
LOGS_PATH, os.path.basename(os.path.normpath(sys.argv[0].replace(".py", ".log")))
|
||||||
os.path.basename(os.path.normpath(sys.argv[0].replace(".py", ".log")))
|
|
||||||
)
|
)
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
filename=out_path,
|
filename=out_path,
|
||||||
|
|||||||
Reference in New Issue
Block a user