feat: add training retry time (#3187)

* feat: add training retry time

* remoce log
This commit is contained in:
Archer
2024-11-18 20:57:03 +08:00
committed by shilin66
parent be7a08304e
commit 94361cdbcd
4 changed files with 49 additions and 7 deletions

View File

@@ -39,11 +39,13 @@ export async function generateQA(): Promise<any> {
try {
const data = await MongoDatasetTraining.findOneAndUpdate(
{
lockTime: { $lte: addMinutes(new Date(), -6) },
mode: TrainingModeEnum.qa
mode: TrainingModeEnum.qa,
retryCount: { $gte: 0 },
lockTime: { $lte: addMinutes(new Date(), -6) }
},
{
lockTime: new Date()
lockTime: new Date(),
$inc: { retryCount: -1 }
}
)
.select({