configurable cooldown

This commit is contained in:
Nour Alharithi
2024-02-26 11:18:08 -08:00
parent 700dc8bde7
commit 53b18e2c30

View File

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