Compare commits

...
3 Commits
Author SHA1 Message Date
Niko Storni 8c349cf7ac fix bug in queues 2019-06-24 04:14:27 -04:00
Niko Storni f3f40c41ef fix refill balance 2019-06-22 06:08:11 -04:00
Niko Storni 05b65c4cb5 add noretry failure 2019-06-21 16:41:46 +02:00
3 changed files with 5 additions and 4 deletions

No files matched your search

+1 -1
View File
@@ -177,7 +177,7 @@ func (s *SyncManager) Start() error {
namer: namer.NewNamer(),
Fee: c.Fee,
})
break
continue
}
}
}
+3 -3
View File
@@ -90,12 +90,12 @@ func (s *Sync) walletSetup() error {
}
s.syncedVideosMux.RUnlock()
log.Debugf("We already allocated credits for %d videos", publishedCount)
log.Debugf("We already allocated credits for %d published videos and %d failed videos", publishedCount, failedCount)
if videosOnYoutube > s.Manager.videosLimit {
videosOnYoutube = s.Manager.videosLimit
}
unallocatedVideos := videosOnYoutube - publishedCount
unallocatedVideos := videosOnYoutube - (publishedCount + failedCount)
requiredBalance := float64(unallocatedVideos)*(publishAmount+estimatedMaxTxFee) + channelClaimAmount
if s.Manager.upgradeMetadata {
requiredBalance += float64(notUpgradedCount) * 0.001
@@ -103,7 +103,7 @@ func (s *Sync) walletSetup() error {
refillAmount := 0.0
if balance < requiredBalance || balance < minimumAccountBalance {
refillAmount = math.Max(requiredBalance-requiredBalance, minimumRefillAmount)
refillAmount = math.Max(requiredBalance-balance, minimumRefillAmount)
}
if s.Refill > 0 {
+1
View File
@@ -675,6 +675,7 @@ func (s *Sync) startWorker(workerNum int) {
"Watch this video on YouTube.",
"have blocked it on copyright grounds",
"the video must be republished as we can't get the right size",
"Invalid status code: 403",
}
if strings.Contains(err.Error(), "txn-mempool-conflict") ||
strings.Contains(err.Error(), "too-long-mempool-chain") {