diff options
Diffstat (limited to 'src/rhimportd/ctrlWatchDir.go')
-rw-r--r-- | src/rhimportd/ctrlWatchDir.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rhimportd/ctrlWatchDir.go b/src/rhimportd/ctrlWatchDir.go index 91b7621..87246a7 100644 --- a/src/rhimportd/ctrlWatchDir.go +++ b/src/rhimportd/ctrlWatchDir.go @@ -101,7 +101,7 @@ func watchDirResponse(filename string, result *rhimport.Result) { watchDirWriteResponse(filename, &watchDirResponseData{result.ResponseCode, result.ErrorString, result.Cart, result.Cut, result.SourceFile}) } -func watchDirParseRequest(conf *rhimport.Config, db *rddb.DBChan, req *os.File) (ctx *rhimport.Context, err error) { +func watchDirParseRequest(conf *rhimport.Config, db *rddb.DB, req *os.File) (ctx *rhimport.Context, err error) { decoder := json.NewDecoder(req) reqdata := newWatchDirRequestData(conf) @@ -132,7 +132,7 @@ func watchDirParseRequest(conf *rhimport.Config, db *rddb.DBChan, req *os.File) return } -func watchDirHandler(conf *rhimport.Config, db *rddb.DBChan, ctx *rhimport.Context, filename string) { +func watchDirHandler(conf *rhimport.Config, db *rddb.DB, ctx *rhimport.Context, filename string) { rhdl.Printf("WatchDirHandler: request for '%s'", filename) var err error @@ -169,7 +169,7 @@ func watchDirHandler(conf *rhimport.Config, db *rddb.DBChan, ctx *rhimport.Conte return } -func watchDirRun(dirname string, conf *rhimport.Config, db *rddb.DBChan) bool { +func watchDirRun(dirname string, conf *rhimport.Config, db *rddb.DB) bool { dir, err := os.Open(dirname) if err != nil { rhl.Printf("watch-dir-ctrl: %s", err) @@ -216,7 +216,7 @@ func watchDirRun(dirname string, conf *rhimport.Config, db *rddb.DBChan) bool { return true } -func StartWatchDir(dirname string, conf *rhimport.Config, db *rddb.DBChan) { +func StartWatchDir(dirname string, conf *rhimport.Config, db *rddb.DB) { for { rhl.Printf("watch-dir-ctrl: watching for files in %s", dirname) t := time.NewTicker(1 * time.Second) |