Housekeeping + Fix DB perf issues (#542)

* Housekeeping + fix db perf issues

* run prep
This commit is contained in:
Geometrically
2023-02-22 16:11:14 -07:00
committed by GitHub
parent 9afdc55416
commit 00d09aa01e
21 changed files with 1251 additions and 674 deletions

View File

@@ -23,7 +23,7 @@ impl super::Validator for FabricValidator {
fn get_supported_game_versions(&self) -> SupportedGameVersions {
// Time since release of 18w49a, the first fabric version
SupportedGameVersions::PastDate(DateTime::from_utc(
NaiveDateTime::from_timestamp(1543969469, 0),
NaiveDateTime::from_timestamp_opt(1543969469, 0).unwrap(),
Utc,
))
}

View File

@@ -23,7 +23,7 @@ impl super::Validator for ForgeValidator {
fn get_supported_game_versions(&self) -> SupportedGameVersions {
// Time since release of 1.13, the first forge version which uses the new TOML system
SupportedGameVersions::PastDate(DateTime::<Utc>::from_utc(
NaiveDateTime::from_timestamp(1540122067, 0),
NaiveDateTime::from_timestamp_opt(1540122067, 0).unwrap(),
Utc,
))
}
@@ -69,11 +69,11 @@ impl super::Validator for LegacyForgeValidator {
// Times between versions 1.5.2 to 1.12.2, which all use the legacy way of defining mods
SupportedGameVersions::Range(
DateTime::from_utc(
NaiveDateTime::from_timestamp(1366818300, 0),
NaiveDateTime::from_timestamp_opt(1366818300, 0).unwrap(),
Utc,
),
DateTime::from_utc(
NaiveDateTime::from_timestamp(1505810340, 0),
NaiveDateTime::from_timestamp_opt(1505810340, 0).unwrap(),
Utc,
),
)

View File

@@ -22,7 +22,7 @@ impl super::Validator for QuiltValidator {
fn get_supported_game_versions(&self) -> SupportedGameVersions {
SupportedGameVersions::PastDate(DateTime::from_utc(
NaiveDateTime::from_timestamp(1646070100, 0),
NaiveDateTime::from_timestamp_opt(1646070100, 0).unwrap(),
Utc,
))
}

View File

@@ -23,7 +23,7 @@ impl super::Validator for PackValidator {
fn get_supported_game_versions(&self) -> SupportedGameVersions {
// Time since release of 13w24a which replaced texture packs with resource packs
SupportedGameVersions::PastDate(DateTime::from_utc(
NaiveDateTime::from_timestamp(1371137542, 0),
NaiveDateTime::from_timestamp_opt(1371137542, 0).unwrap(),
Utc,
))
}
@@ -61,11 +61,11 @@ impl super::Validator for TexturePackValidator {
// a1.2.2a to 13w23b
SupportedGameVersions::Range(
DateTime::from_utc(
NaiveDateTime::from_timestamp(1289339999, 0),
NaiveDateTime::from_timestamp_opt(1289339999, 0).unwrap(),
Utc,
),
DateTime::from_utc(
NaiveDateTime::from_timestamp(1370651522, 0),
NaiveDateTime::from_timestamp_opt(1370651522, 0).unwrap(),
Utc,
),
)