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:
parent
a345cc28c3
commit
bde1341337
1 changed files with 4 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
from datetime import datetime
|
||||||
from bson.objectid import ObjectId
|
from bson.objectid import ObjectId
|
||||||
|
|
||||||
from pyfastocloud_models.stream.entry import IStream, ProxyStream, EncodeStream, RelayStream, TimeshiftRecorderStream, \
|
from pyfastocloud_models.stream.entry import IStream, ProxyStream, EncodeStream, RelayStream, TimeshiftRecorderStream, \
|
||||||
|
@ -408,5 +409,6 @@ class Service(IStreamHandler):
|
||||||
def __refresh_catchups(self):
|
def __refresh_catchups(self):
|
||||||
for stream in self._streams:
|
for stream in self._streams:
|
||||||
if stream.get_type() == constants.StreamType.CATCHUP:
|
if stream.get_type() == constants.StreamType.CATCHUP:
|
||||||
self._client.start_stream(stream.config())
|
now = datetime.now()
|
||||||
return
|
if stream.start > now and now < stream.stop and not stream.is_started():
|
||||||
|
self._client.start_stream(stream.config())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue