Markus Pesch
500d1a5823
Changes: - Split temperatures from log file into blocks. Every block has a size of 500 entries. Every block would be send to the remote host
28 lines
565 B
Go
28 lines
565 B
Go
package sensor
|
|
|
|
import (
|
|
"log"
|
|
|
|
"git.cryptic.systems/fh-trier/go-flucky/pkg/httpcall"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var force bool
|
|
|
|
var syncSensorCmd = &cobra.Command{
|
|
Use: "sync",
|
|
Short: "Synchronise Sensors with Remote Servers",
|
|
Aliases: []string{"synchronize"},
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
if err := httpcall.SyncSensors(configDir, force); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
sensorCmd.AddCommand(syncSensorCmd)
|
|
syncSensorCmd.Flags().BoolVarP(&force, "force", "f", false, "Include disabled remote links")
|
|
}
|