mirror of
https://github.com/FoxxMD/multi-scrobbler.git
synced 2026-04-28 03:39:54 +00:00
fix: Fix missing await on stagger mapper initial sleep
This commit is contained in:
parent
981805aa96
commit
4caf1c8cdb
2 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ import { parseVersion } from "./version.js";
|
|||
import { initServer } from "./server/index.js";
|
||||
import { createHeartbeatClientsTask } from "./tasks/heartbeatClients.js";
|
||||
import { createHeartbeatSourcesTask } from "./tasks/heartbeatSources.js";
|
||||
import { isDebugMode, parseBool, retry, sleep } from "./utils.js";
|
||||
import { isDebugMode, parseBool, retry } from "./utils.js";
|
||||
import { readJson } from './utils/DataUtils.js';
|
||||
//import { createVegaGenerator } from './utils/SchemaUtils.js';
|
||||
import ScrobbleClients from './scrobblers/ScrobbleClients.js';
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export function staggerMapper<Element, NewElement>(options: StaggerOptions) {
|
|||
|
||||
return (mapper: Mapper<Element, NewElement>) => async (x: Element, index: number) => {
|
||||
if (index < concurrency) {
|
||||
sleep(initialStagger);
|
||||
await sleep(initialStagger);
|
||||
initialStagger += initialInterval;
|
||||
} else {
|
||||
const s = Math.min((Math.random() * 1000), maxRandomStagger)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue