Removed unnused variable assignment and unecessary for loop
parent
00b10ac64c
commit
6c0b011e51
|
@ -90,16 +90,12 @@ func ExecuteTask(task Task) Task {
|
||||||
|
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
statusUpdate, err := db.Query("UPDATE tasks SET status = 1 WHERE ID = " + strconv.Itoa(task.ID))
|
_, err = db.Query("UPDATE tasks SET status = 1 WHERE ID = " + strconv.Itoa(task.ID))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
for statusUpdate.Next() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if diagnostics.Version == "dev" {
|
if diagnostics.Version == "dev" {
|
||||||
log.Printf("Dev environemnt. Not executing tasks.")
|
log.Printf("Dev environemnt. Not executing tasks.")
|
||||||
} else {
|
} else {
|
||||||
|
@ -244,16 +240,12 @@ func taskGetEdgeApps() string {
|
||||||
|
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
statusUpdate, err := db.Query("REPLACE into options (name, value) VALUES ('EDGEAPPS_LIST','" + string(edgeAppsJSON) + "');")
|
_, err = db.Query("REPLACE into options (name, value) VALUES ('EDGEAPPS_LIST','" + string(edgeAppsJSON) + "');")
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
for statusUpdate.Next() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return string(edgeAppsJSON)
|
return string(edgeAppsJSON)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue