configurable cooldown

This commit is contained in:
Nour Alharithi
2024-02-26 11:18:48 -08:00
parent 53b18e2c30
commit 510d94a4f8

View File

@@ -408,7 +408,7 @@ const main = async (): Promise<void> => {
const state = spotMarketRedisMap.get(marketIndex); const state = spotMarketRedisMap.get(marketIndex);
if (state) { if (state) {
const now = Date.now(); const now = Date.now();
if (now - state.lastRotationTime > 30500000 && !state.lock) { if (now - state.lastRotationTime > ROTATION_COOLDOWN && !state.lock) {
state.lastRotationTime = now; state.lastRotationTime = now;
return true; return true;
} }