fix mysterious bug
This commit is contained in:
parent
d946d6ee76
commit
29d50ec0d2
1 changed files with 1 additions and 5 deletions
6
setup.go
6
setup.go
|
@ -53,12 +53,8 @@ func (s *Sync) walletSetup() error {
|
||||||
numOnSource = uint64(s.Manager.VideosLimit)
|
numOnSource = uint64(s.Manager.VideosLimit)
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: get rid of this as soon as we compute this condition using the database in a more reliable way
|
|
||||||
if numPublished >= numOnSource {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
minBalance := (float64(numOnSource)-float64(numPublished))*(publishAmount+0.1) + channelClaimAmount
|
minBalance := (float64(numOnSource)-float64(numPublished))*(publishAmount+0.1) + channelClaimAmount
|
||||||
if numPublished > numOnSource {
|
if numPublished > numOnSource && balance.LessThan(decimal.NewFromFloat(1)) {
|
||||||
SendErrorToSlack("something is going on as we published more videos than those available on source: %d/%d", numPublished, numOnSource)
|
SendErrorToSlack("something is going on as we published more videos than those available on source: %d/%d", numPublished, numOnSource)
|
||||||
minBalance = 1 //since we ended up in this function it means some juice is still needed
|
minBalance = 1 //since we ended up in this function it means some juice is still needed
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue