prevent live streams from syncing
reduce timeout to 20 minutes
This commit is contained in:
parent
69c2a91ec7
commit
95890cbabf
3 changed files with 6 additions and 2 deletions
|
@ -86,7 +86,7 @@ func abandonSupports(s *Sync) (float64, error) {
|
|||
consumerWG := &stop.Group{}
|
||||
//TODO: remove this once the SDK team fixes their RPC bugs....
|
||||
s.daemon.SetRPCTimeout(30 * time.Second)
|
||||
defer s.daemon.SetRPCTimeout(40 * time.Minute)
|
||||
defer s.daemon.SetRPCTimeout(20 * time.Minute)
|
||||
for i := 0; i < s.ConcurrentVideos; i++ {
|
||||
consumerWG.Add(1)
|
||||
go func() {
|
||||
|
|
|
@ -307,7 +307,7 @@ func (s *Sync) FullCycle() (e error) {
|
|||
|
||||
log.Infoln("Waiting for daemon to finish starting...")
|
||||
s.daemon = jsonrpc.NewClient(os.Getenv("LBRYNET_ADDRESS"))
|
||||
s.daemon.SetRPCTimeout(40 * time.Minute)
|
||||
s.daemon.SetRPCTimeout(20 * time.Minute)
|
||||
|
||||
err = s.waitForDaemonStart()
|
||||
if err != nil {
|
||||
|
@ -904,6 +904,7 @@ func (s *Sync) startWorker(workerNum int) {
|
|||
"interrupted by user",
|
||||
"Sign in to confirm your age",
|
||||
"This video is unavailable",
|
||||
"video is a live stream and hasn't completed yet",
|
||||
}
|
||||
if util.SubstringInSlice(err.Error(), errorsNoRetry) {
|
||||
log.Println("This error should not be retried at all")
|
||||
|
|
|
@ -180,6 +180,9 @@ func (v *YoutubeVideo) getAbbrevDescription() string {
|
|||
}
|
||||
|
||||
func (v *YoutubeVideo) download() error {
|
||||
if v.youtubeInfo.Snippet.LiveBroadcastContent != "none" {
|
||||
return errors.Err("video is a live stream and hasn't completed yet")
|
||||
}
|
||||
videoPath := v.getFullPath()
|
||||
|
||||
err := os.Mkdir(v.videoDir(), 0777)
|
||||
|
|
Loading…
Reference in a new issue