Wait a bit between two channel udpates.

This commit is contained in:
Relintai 2023-08-25 17:05:07 +02:00
parent d829af3d7c
commit 0c6cfd452a

View File

@ -18,6 +18,8 @@ import sys
import datetime
import shutil
import gc
import time
import random
config_data = []
video_file_data = {}
@ -29,6 +31,9 @@ def print_usage():
print("gen : generates video download shell script");
exit()
def sleep_range(min_sleep, rand_add):
time.sleep(random.random() * float(rand_add) + float(min_sleep))
def copy(src, dest):
try:
shutil.copytree(src, dest)
@ -838,3 +843,6 @@ if command == "gen":
collected = gc.collect()
print("Garbage collector: collected", "%d objects." % collected)
# TODO make this customizable from the commadn line
sleep_range(10, 5)