a liitle change

This commit is contained in:
siddontang 2014-06-11 14:52:34 +08:00
parent ebd15e5738
commit 00b5fb4b24
3 changed files with 7 additions and 1 deletions

View File

@ -9,7 +9,7 @@ import (
"syscall" "syscall"
) )
var configFile = flag.String("config", "", "ledisdb config file") var configFile = flag.String("config", "/etc/ledis.json", "ledisdb config file")
func main() { func main() {
runtime.GOMAXPROCS(runtime.NumCPU()) runtime.GOMAXPROCS(runtime.NumCPU())

View File

@ -123,7 +123,9 @@ func (l *Ledis) ReplicateFromBinLog(filePath string) error {
rb := bufio.NewReaderSize(f, 4096) rb := bufio.NewReaderSize(f, 4096)
l.Lock()
err = l.ReplicateFromReader(rb) err = l.ReplicateFromReader(rb)
l.Unlock()
f.Close() f.Close()

View File

@ -90,3 +90,7 @@ func (app *App) Run() {
newClient(conn, app) newClient(conn, app)
} }
} }
func (app *App) Ledis() *ledis.DB {
return app.ldb
}