fix: splited temperatures
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
This commit is contained in:
@ -11,8 +11,9 @@ import (
|
||||
var quiet bool
|
||||
|
||||
var listSensorCmd = &cobra.Command{
|
||||
Use: "list",
|
||||
Short: "List Sensors",
|
||||
Use: "ls",
|
||||
Short: "List Sensors",
|
||||
Aliases: []string{"list"},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if err := sensor.Print(os.Stdout, configDir, quiet); err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -8,9 +8,10 @@ import (
|
||||
)
|
||||
|
||||
var rmSensorCmd = &cobra.Command{
|
||||
Use: "rm",
|
||||
Short: "Remove Sensor",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Use: "rm",
|
||||
Short: "Remove Sensor",
|
||||
Aliases: []string{"remove"},
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if err := sensor.Remove(args[0], configDir); err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -10,8 +10,9 @@ import (
|
||||
var force bool
|
||||
|
||||
var syncSensorCmd = &cobra.Command{
|
||||
Use: "sync",
|
||||
Short: "Synchronise Sensors with Remote Servers",
|
||||
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 {
|
||||
|
Reference in New Issue
Block a user