incompleted cm

This commit is contained in:
snoop 2017-04-15 20:36:15 +09:00
parent 6fb4e8e935
commit e99727b62a
2 changed files with 40 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import (
"log"
"github.com/kataras/go-errors"
"path/filepath"
)
const (
@ -266,5 +267,21 @@ func (c *CrawlerManager)removeProcessFile(pid *string) {
}
func (c *CrawlerManager)activeCrawler(container *string) []string {
var dirs []string
existConfigFileDir(ConfigFolder,*container,&dirs)
if len(dirs) <= 0 {
return nil
}
var r []string
for _, path := range dirs {
r = append(r, filepath.Base(path))
}
return r
}

View File

@ -247,4 +247,27 @@ func TestRunRun(t *testing.T) {
GetInstance().stopContainer(&c)
}
func TestActiveCrawler(t *testing.T) {
c := "java"
GetInstance().runContainer(&c)
aa := GetInstance().activeCrawler(&c)
t.Log(aa)
GetInstance().stopContainer(&c)
}
func TestErer(t *testing.T) {
var asdf []string
asdf = nil
t.Log(len(asdf))
}