diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/db.js | 7 | ||||
| -rw-r--r-- | lib/locations.js | 2 |
2 files changed, 7 insertions, 2 deletions
@@ -3,7 +3,12 @@ import { sleep } from "$lib/utils"; import { createClient } from "redis"; export const db = createClient({ url: config.db }); -await db.connect(); +try { + await db.connect(); + console.log("CONNECTED") +} catch (e) { + console.log("FAILED CONNECTION") +} export default db; export let g = async k => { diff --git a/lib/locations.js b/lib/locations.js index 39883555..be2df811 100644 --- a/lib/locations.js +++ b/lib/locations.js @@ -10,7 +10,7 @@ export let getLocations = async () => { locations = locations.filter( l => l["osm_json"].tags && l["osm_json"].tags["payment:coinos"] === "yes" ); - + await s("locations", locations); } catch (e) {} |
