feat(beatmapset): enhance jitter calculation for too-long next sync time
This commit is contained in:
@@ -94,7 +94,12 @@ class ProcessingBeatmapset:
|
|||||||
next_delta = min(max_seconds, delta)
|
next_delta = min(max_seconds, delta)
|
||||||
else:
|
else:
|
||||||
next_delta = MIN_DELTA
|
next_delta = MIN_DELTA
|
||||||
jitter = timedelta(minutes=random.randint(JITTER_MIN, JITTER_MAX))
|
|
||||||
|
if next_delta > 86400:
|
||||||
|
minor = round(next_delta / 10)
|
||||||
|
jitter = timedelta(seconds=random.randint(-minor, minor))
|
||||||
|
else:
|
||||||
|
jitter = timedelta(minutes=random.randint(JITTER_MIN, JITTER_MAX))
|
||||||
return timedelta(seconds=next_delta) + jitter
|
return timedelta(seconds=next_delta) + jitter
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user