mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-07 14:28:09 +03:00
Merge branch 'hotfix/v2.1.12' into develop
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ not generally be shown to end users.
|
||||
|
||||
# Changelog
|
||||
|
||||
# CURRENT
|
||||
# 2.1.11
|
||||
|
||||
- [ENH] The LR2Hook now saves courses.
|
||||
- [ENH] The LR2Hook now saves gauge information.
|
||||
|
||||
Generated
+9
-9
@@ -95,7 +95,7 @@ dependencies:
|
||||
fast-json-stable-hash: 1.0.3
|
||||
fast-xml-parser: 4.0.2
|
||||
helmet: 5.0.2
|
||||
html-entities: 2.3.2
|
||||
html-entities: 2.3.3
|
||||
json5: 2.2.0
|
||||
mkdirp: 1.0.4
|
||||
mongodb: 3.6.3
|
||||
@@ -3166,23 +3166,23 @@ packages:
|
||||
}
|
||||
dev: false
|
||||
|
||||
/css-select/4.2.1:
|
||||
/css-select/4.3.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==,
|
||||
integrity: sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==,
|
||||
}
|
||||
dependencies:
|
||||
boolbase: 1.0.0
|
||||
css-what: 5.1.0
|
||||
css-what: 6.1.0
|
||||
domhandler: 4.3.1
|
||||
domutils: 2.8.0
|
||||
nth-check: 2.0.1
|
||||
dev: false
|
||||
|
||||
/css-what/5.1.0:
|
||||
/css-what/6.1.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==,
|
||||
integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==,
|
||||
}
|
||||
engines: { node: ">= 6" }
|
||||
dev: false
|
||||
@@ -4574,10 +4574,10 @@ packages:
|
||||
engines: { node: ">=8" }
|
||||
dev: true
|
||||
|
||||
/html-entities/2.3.2:
|
||||
/html-entities/2.3.3:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==,
|
||||
integrity: sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==,
|
||||
}
|
||||
dev: false
|
||||
|
||||
@@ -5760,7 +5760,7 @@ packages:
|
||||
integrity: sha512-ncg1033CaX9UexbyA7e1N0aAoAYRDiV8jkTvzEnfd1GDvzFdrsXLzR4p4ik8mwLgnaKP/jyUFWDy9q3jvRT2Jw==,
|
||||
}
|
||||
dependencies:
|
||||
css-select: 4.2.1
|
||||
css-select: 4.3.0
|
||||
he: 1.2.0
|
||||
dev: false
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// essentially share codebases.
|
||||
|
||||
const MAJOR = 2;
|
||||
const MINOR = 2;
|
||||
const PATCH = 0;
|
||||
const MINOR = 1;
|
||||
const PATCH = 12;
|
||||
|
||||
// As is with all front-facing zkldi projects, the version names for tachi-server
|
||||
// are from an album I like. In this case, the album is Portishead - Dummy.
|
||||
|
||||
@@ -64,20 +64,20 @@ export default async function ScoreImportMain<D, C>(
|
||||
logger = providedLogger;
|
||||
}
|
||||
|
||||
const hasNoOngoingImport = await CheckAndSetOngoingImportLock(user.id);
|
||||
|
||||
if (hasNoOngoingImport) {
|
||||
logger.info(`User ${userID} made an import while they had one ongoing.`);
|
||||
// @danger
|
||||
// Throwing away an import if the user already has one outgoing is *bad*, as in the case
|
||||
// of degraded performance we might just start throwing scores away.
|
||||
// Under normal circumstances, there is no scenario where a user would have two ongoing
|
||||
// imports at the same time - even if they were using single-score imports on a 5 second
|
||||
// chart, as each score import takes only around ~10-15milliseconds.
|
||||
throw new ScoreImportFatalError(409, "This user already has an ongoing import.");
|
||||
}
|
||||
|
||||
try {
|
||||
const hasNoOngoingImport = await CheckAndSetOngoingImportLock(user.id);
|
||||
|
||||
if (hasNoOngoingImport) {
|
||||
logger.info(`User ${userID} made an import while they had one ongoing.`);
|
||||
// @danger
|
||||
// Throwing away an import if the user already has one outgoing is *bad*, as in the case
|
||||
// of degraded performance we might just start throwing scores away.
|
||||
// Under normal circumstances, there is no scenario where a user would have two ongoing
|
||||
// imports at the same time - even if they were using single-score imports on a 5 second
|
||||
// chart, as each score import takes only around ~10-15milliseconds.
|
||||
throw new ScoreImportFatalError(409, "This user already has an ongoing import.");
|
||||
}
|
||||
|
||||
const timeStarted = Date.now();
|
||||
|
||||
SetJobProgress(job, "Parsing score data.");
|
||||
|
||||
@@ -113,7 +113,8 @@ t.test("#ConvertVersion", (t) => {
|
||||
t.equal(ConvertVersion(3), "gw");
|
||||
t.equal(ConvertVersion(4), "heaven");
|
||||
t.equal(ConvertVersion(5), "vivid");
|
||||
t.throws(() => ConvertVersion(6));
|
||||
t.equal(ConvertVersion(6), "exceed");
|
||||
t.throws(() => ConvertVersion(7));
|
||||
t.throws(() => ConvertVersion(0));
|
||||
|
||||
t.end();
|
||||
|
||||
@@ -132,6 +132,8 @@ export function ConvertVersion(ver: number) {
|
||||
return "heaven";
|
||||
case 5:
|
||||
return "vivid";
|
||||
case 6:
|
||||
return "exceed";
|
||||
}
|
||||
|
||||
throw new InvalidScoreFailure(`Unknown Game Version ${ver}.`);
|
||||
|
||||
@@ -171,6 +171,18 @@ const syncInstructions: SyncInstructions[] = [
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
pattern: /^songs-(b|p)ms/u,
|
||||
handler: async (songs: SongDocument[], collection: ICollection<SongDocument>, logger) => {
|
||||
const r = await GenericUpsert(songs, collection, "id", logger, false);
|
||||
|
||||
if (r.thingsChanged) {
|
||||
await RecalcAllScores({
|
||||
songID: { $in: r.changedFields },
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
pattern: /^songs-/u,
|
||||
handler: async (songs: SongDocument[], collection: ICollection<SongDocument>, logger) => {
|
||||
|
||||
Reference in New Issue
Block a user