1
0
Fork 0
mirror of https://github.com/fastogt/fastocloud_admin.git synced 2025-03-09 23:38:52 +00:00

Start catchups

This commit is contained in:
topilski 2020-02-10 12:43:30 -05:00
parent a345cc28c3
commit bde1341337

View file

@ -1,3 +1,4 @@
from datetime import datetime
from bson.objectid import ObjectId
from pyfastocloud_models.stream.entry import IStream, ProxyStream, EncodeStream, RelayStream, TimeshiftRecorderStream, \
@ -408,5 +409,6 @@ class Service(IStreamHandler):
def __refresh_catchups(self):
for stream in self._streams:
if stream.get_type() == constants.StreamType.CATCHUP:
now = datetime.now()
if stream.start > now and now < stream.stop and not stream.is_started():
self._client.start_stream(stream.config())
return