mirror of
https://github.com/nkanaev/yarr.git
synced 2025-12-15 00:27:20 +00:00
track running status
This commit is contained in:
@@ -63,7 +63,7 @@ func StaticHandler(rw http.ResponseWriter, req *http.Request) {
|
||||
|
||||
func StatusHandler(rw http.ResponseWriter, req *http.Request) {
|
||||
writeJSON(rw, map[string]interface{}{
|
||||
"running": handler(req).queueSize > 0,
|
||||
"running": *handler(req).queueSize > 0,
|
||||
"stats": db(req).FeedStats(),
|
||||
})
|
||||
}
|
||||
@@ -438,6 +438,8 @@ func OPMLImportHandler(rw http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
}
|
||||
}
|
||||
handler(req).fetchAllFeeds()
|
||||
rw.WriteHeader(http.StatusOK)
|
||||
} else {
|
||||
rw.WriteHeader(http.StatusMethodNotAllowed)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user