build_type.py -> build_info.py

This commit is contained in:
Alex Grintsvayg 2020-01-23 08:40:24 -05:00
parent 38a3f8cf4c
commit 7fd56e0add
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5
3 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@ import platform
import os import os
import logging.handlers import logging.handlers
from lbry import build_type, __version__ as lbrynet_version from lbry import build_info, __version__ as lbrynet_version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -19,7 +19,7 @@ def get_platform() -> dict:
"os_system": os_system, "os_system": os_system,
"lbrynet_version": lbrynet_version, "lbrynet_version": lbrynet_version,
"version": lbrynet_version, "version": lbrynet_version,
"build": build_type.BUILD, # CI server sets this during build step "build": build_info.BUILD, # CI server sets this during build step
} }
if d["os_system"] == "Linux": if d["os_system"] == "Linux":
import distro # pylint: disable=import-outside-toplevel import distro # pylint: disable=import-outside-toplevel

View file

@ -2,11 +2,11 @@ from aiohttp import web
from prometheus_client import Counter, Info, generate_latest as prom_generate_latest from prometheus_client import Counter, Info, generate_latest as prom_generate_latest
from lbry.wallet.server import util from lbry.wallet.server import util
from lbry import __version__ as version from lbry import __version__ as version
from lbry.build_type import BUILD, COMMIT_HASH from lbry.build_info import BUILD, COMMIT_HASH
NAMESPACE = "wallet_server" NAMESPACE = "wallet_server"
VERSION_INFO = Info('build_info', 'Wallet server build info (e.g. version, commit hash)', namespace=NAMESPACE) VERSION_INFO = Info('build', 'Wallet server build info (e.g. version, commit hash)', namespace=NAMESPACE)
VERSION_INFO.info({'version': version, 'build': BUILD, "commit": COMMIT_HASH}) VERSION_INFO.info({'version': version, 'build': BUILD, "commit": COMMIT_HASH})
REQUESTS_COUNT = Counter("requests_count", "Number of requests received", namespace=NAMESPACE) REQUESTS_COUNT = Counter("requests_count", "Number of requests received", namespace=NAMESPACE)