mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Bump Lavalink.jar version and update the default application.yml (#5823)
* Bump Lavalink.jar version * Update the default Lavalink YAML file * Let's add schema migration too... * Fix migration (but still actually untested)
This commit is contained in:
parent
87a9c10369
commit
4daf81aa5b
@ -338,6 +338,25 @@ class MiscellaneousUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
|||||||
await p.save()
|
await p.save()
|
||||||
await self.config.custom(scope).clear()
|
await self.config.custom(scope).clear()
|
||||||
await self.config.schema_version.set(3)
|
await self.config.schema_version.set(3)
|
||||||
|
if from_version < 4 <= to_version:
|
||||||
|
# At the time of the introduction of this schema migration,
|
||||||
|
# none of these were settable by users even though they're registered in Config
|
||||||
|
# so this shouldn't have ever been set but there's no real harm in doing this
|
||||||
|
# and schema migrations are a good practice.
|
||||||
|
global_data = await self.config.all()
|
||||||
|
# We're intentionally not setting entire `global_data` to
|
||||||
|
# avoid storing the default values when they were not already set.
|
||||||
|
logging_data = global_data.get("yaml", {}).get("logging", {})
|
||||||
|
max_history = logging_data.get("file", {}).pop("max_history", ...)
|
||||||
|
if max_history is not ...:
|
||||||
|
await self.config.yaml.logging.logback.rollingpolicy.max_history.set(max_history)
|
||||||
|
max_size = logging_data.get("file", {}).pop("max_size", ...)
|
||||||
|
if max_size is not ...:
|
||||||
|
await self.config.yaml.logging.logback.rollingpolicy.max_size.set(max_size)
|
||||||
|
path = logging_data.pop("path", ...)
|
||||||
|
if path is not ...:
|
||||||
|
await self.config.yaml.logging.file.path.set(path)
|
||||||
|
await self.config.schema_version.set(4)
|
||||||
|
|
||||||
if database_entries:
|
if database_entries:
|
||||||
await self.api_interface.local_cache_api.lavalink.insert(database_entries)
|
await self.api_interface.local_cache_api.lavalink.insert(database_entries)
|
||||||
|
|||||||
@ -51,7 +51,7 @@ if TYPE_CHECKING:
|
|||||||
_ = Translator("Audio", pathlib.Path(__file__))
|
_ = Translator("Audio", pathlib.Path(__file__))
|
||||||
log = getLogger("red.Audio.manager")
|
log = getLogger("red.Audio.manager")
|
||||||
JAR_VERSION: Final[str] = "3.4.0"
|
JAR_VERSION: Final[str] = "3.4.0"
|
||||||
JAR_BUILD: Final[int] = 1347
|
JAR_BUILD: Final[int] = 1350
|
||||||
LAVALINK_DOWNLOAD_URL: Final[str] = (
|
LAVALINK_DOWNLOAD_URL: Final[str] = (
|
||||||
"https://github.com/Cog-Creators/Lavalink-Jars/releases/download/"
|
"https://github.com/Cog-Creators/Lavalink-Jars/releases/download/"
|
||||||
f"{JAR_VERSION}_{JAR_BUILD}/"
|
f"{JAR_VERSION}_{JAR_BUILD}/"
|
||||||
|
|||||||
@ -78,11 +78,11 @@ DEFAULT_LAVALINK_YAML = {
|
|||||||
"yaml__metrics__prometheus__endpoint": "/metrics",
|
"yaml__metrics__prometheus__endpoint": "/metrics",
|
||||||
"yaml__sentry__dsn": "",
|
"yaml__sentry__dsn": "",
|
||||||
"yaml__sentry__environment": "",
|
"yaml__sentry__environment": "",
|
||||||
"yaml__logging__file__max_history": 15,
|
"yaml__logging__file__path": "./logs/",
|
||||||
"yaml__logging__file__max_size": "10MB",
|
|
||||||
"yaml__logging__path": "./logs/",
|
|
||||||
"yaml__logging__level__root": "INFO",
|
"yaml__logging__level__root": "INFO",
|
||||||
"yaml__logging__level__lavalink": "INFO",
|
"yaml__logging__level__lavalink": "INFO",
|
||||||
|
"yaml__logging__logback__rollingpolicy__max_history": 15,
|
||||||
|
"yaml__logging__logback__rollingpolicy__max_size": "10MB",
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFAULT_LAVALINK_SETTINGS = {
|
DEFAULT_LAVALINK_SETTINGS = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user