Skip to content
Snippets Groups Projects
Commit 1b9fa402 authored by Zed's avatar Zed
Browse files

Silence Jester's query warning

parent 558fc7a8
No related branches found
No related tags found
No related merge requests found
import asyncdispatch
import asyncdispatch, logging, strformat
from net import Port
import jester
......@@ -12,11 +12,22 @@ import routes/[
const configPath {.strdefine.} = "./nitter.conf"
let (cfg, fullCfg) = getConfig(configPath)
# Silence Jester's query warning
addHandler(newConsoleLogger())
setLogFilter(lvlError)
let http = if cfg.useHttps: "https" else: "http"
stdout.write &"Starting Nitter at {http}://{cfg.hostname}\n"
stdout.flushFile
updateDefaultPrefs(fullCfg)
setCacheTimes(cfg)
setHmacKey(cfg.hmacKey)
waitFor initRedisPool(cfg)
stdout.write &"Connected to Redis at {cfg.redisHost}:{cfg.redisPort}\n"
stdout.flushFile
asyncCheck initTokenPool(cfg)
createUnsupportedRouter(cfg)
......
......@@ -36,7 +36,8 @@ proc initRedisPool*(cfg: Config) {.async.} =
await migrate("frosty", "*")
except OSError:
echo "Failed to connect to Redis."
stdout.write "Failed to connect to Redis.\n"
stdout.flushFile
quit(1)
template toKey(p: Profile): string = "p:" & toLower(p.username)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment