upgraded to latest lbry.go reorg part 2
This commit is contained in:
parent
4789f894b8
commit
01bbe95226
5 changed files with 10 additions and 9 deletions
11
main.go
11
main.go
|
@ -11,6 +11,7 @@ import (
|
|||
"github.com/lbryio/ytsync/sdk"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/lbryio/ytsync/manager"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
@ -85,8 +86,8 @@ func ytSync(cmd *cobra.Command, args []string) {
|
|||
util.InitSlack(os.Getenv("SLACK_TOKEN"), os.Getenv("SLACK_CHANNEL"), hostname)
|
||||
}
|
||||
|
||||
if syncStatus != "" && !util.InSlice(syncStatus, SyncStatuses) {
|
||||
log.Errorf("status must be one of the following: %v\n", SyncStatuses)
|
||||
if syncStatus != "" && !util.InSlice(syncStatus, manager.SyncStatuses) {
|
||||
log.Errorf("status must be one of the following: %v\n", manager.SyncStatuses)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -164,7 +165,7 @@ func ytSync(cmd *cobra.Command, args []string) {
|
|||
ApiToken: apiToken,
|
||||
HostName: hostname,
|
||||
}
|
||||
sm := NewSyncManager(
|
||||
sm := manager.NewSyncManager(
|
||||
stopOnError,
|
||||
maxTries,
|
||||
takeOverExistingChannel,
|
||||
|
@ -190,7 +191,7 @@ func ytSync(cmd *cobra.Command, args []string) {
|
|||
)
|
||||
err := sm.Start()
|
||||
if err != nil {
|
||||
SendErrorToSlack(err.Error())
|
||||
manager.SendErrorToSlack(err.Error())
|
||||
}
|
||||
SendInfoToSlack("Syncing process terminated!")
|
||||
manager.SendInfoToSlack("Syncing process terminated!")
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package main
|
||||
package manager
|
||||
|
||||
import (
|
||||
"net/http"
|
|
@ -1,4 +1,4 @@
|
|||
package main
|
||||
package manager
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -1,4 +1,4 @@
|
|||
package main
|
||||
package manager
|
||||
|
||||
import (
|
||||
"time"
|
|
@ -1,4 +1,4 @@
|
|||
package main
|
||||
package manager
|
||||
|
||||
import (
|
||||
"bufio"
|
Loading…
Reference in a new issue