Rate limit tracker requests during manga migration
This commit is contained in:
@@ -300,13 +300,20 @@ export class MangaMigration {
|
||||
(trackRecord) =>
|
||||
MangaMigration.getOrCreateQueue(trackRecord.trackerId).enqueue(
|
||||
String(mangaToMigrate.id),
|
||||
() =>
|
||||
requestManager.bindTracker(
|
||||
mangaToMigrateTo.id,
|
||||
trackRecord.trackerId,
|
||||
trackRecord.remoteId,
|
||||
trackRecord.private,
|
||||
).response,
|
||||
async () => {
|
||||
try {
|
||||
await requestManager.bindTracker(
|
||||
mangaToMigrateTo.id,
|
||||
trackRecord.trackerId,
|
||||
trackRecord.remoteId,
|
||||
trackRecord.private,
|
||||
).response;
|
||||
} finally {
|
||||
await new Promise((resolve) => {
|
||||
setTimeout(resolve, 500);
|
||||
});
|
||||
}
|
||||
},
|
||||
).promise,
|
||||
),
|
||||
cleanup: () =>
|
||||
|
||||
Reference in New Issue
Block a user