mirror of https://github.com/ledisdb/ledisdb.git
a liitle change
This commit is contained in:
parent
ebd15e5738
commit
00b5fb4b24
|
@ -9,7 +9,7 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
var configFile = flag.String("config", "", "ledisdb config file")
|
||||
var configFile = flag.String("config", "/etc/ledis.json", "ledisdb config file")
|
||||
|
||||
func main() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
|
|
@ -123,7 +123,9 @@ func (l *Ledis) ReplicateFromBinLog(filePath string) error {
|
|||
|
||||
rb := bufio.NewReaderSize(f, 4096)
|
||||
|
||||
l.Lock()
|
||||
err = l.ReplicateFromReader(rb)
|
||||
l.Unlock()
|
||||
|
||||
f.Close()
|
||||
|
||||
|
|
|
@ -90,3 +90,7 @@ func (app *App) Run() {
|
|||
newClient(conn, app)
|
||||
}
|
||||
}
|
||||
|
||||
func (app *App) Ledis() *ledis.DB {
|
||||
return app.ldb
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue