zhangmeng
2019-12-13 2d25b62b60da018412ed164b6fd29470498cea17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package util
 
import (
    "analysis/logo"
    "analysis/work/cache"
 
    "basic.com/dbapi.git"
    "basic.com/pubsub/protomsg.git"
)
 
// InitDBAPI init dbapi
func InitDBAPI() {
    dbapi.Init(FSI.IP, FSI.HTTPort)
    var initchan = make(chan bool)
    go cache.Init(initchan, FSI.IP, FSI.HBPort, FSI.DataPort)
    logo.Infoln("db init done!", <-initchan)
}
 
// TaskInfos get camera infos from sqlite db
func TaskInfos() []protomsg.TaskSdkInfo {
    tAPI := dbapi.TaskApi{}
    tasks := tAPI.FindAll()
 
    return tasks
}
 
// SDKInfo get sdk
func SDKInfo() []protomsg.SdkRun {
    sAPI := dbapi.SdkApi{}
 
    return sAPI.FindAllSdkRun()
}