track running status
This commit is contained in:
parent
f3bfd6fb3a
commit
a2c8e30e79
3 changed files with 12 additions and 5 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue