summaryrefslogtreecommitdiff
path: root/src/rhimportd/ctrlWatchDir.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-28 21:11:57 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-28 21:11:57 (GMT)
commit87f14cff0a86eff014ba52c3cfbbb70ff7cec0b4 (patch)
treef77ea1eacf2b9635f75441059e6f611059f78b7a /src/rhimportd/ctrlWatchDir.go
parent99b4f31e7d952664e39c5c76f03e08da00097053 (diff)
incoporate latest rhrd-go changes
Diffstat (limited to 'src/rhimportd/ctrlWatchDir.go')
-rw-r--r--src/rhimportd/ctrlWatchDir.go8
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)