var
, use let
Var has a bunch of tricky semantics that I'm not using here. Replace it with with let
which behaves more like I expect.
main()
https://code.aether.earth/nogweii/qwick-interview-2022/-/blob/main/scraper/src/scrape_versions.js#L4
This whole function can be removed (leave the code!) as top-level await is just fine.
https://code.aether.earth/nogweii/qwick-interview-2022/-/blob/main/scraper/src/db.js#L12 can be written with as a getter to lazily initialize the object:
let client;
function getClient() {
if(client) {
return client;
}
return client = makeClient();
}
then
when fetching gitlab versionhttps://code.aether.earth/nogweii/qwick-interview-2022/-/blob/main/scraper/src/sources.js#L45
Mixing the two styles (await
vs .then
) is ugly. The first one (decoding the JSON) is arguable, but the second one is probably is unnecessary.
Right now it's serial, making the async part fairly useless. I can bundle them all up with Promise.all
and actually be async.
nogweii (160b1c56) at 06 May 21:06
fix the destination path for the template
nogweii (1b0ded24) at 06 May 21:00
now that I want to template it, use the right ansible module
nogweii (c451e86d) at 06 May 20:42
couple of bug fixes with exposing minikube
nogweii (d43fc117) at 06 May 19:58
Whoops, wasn't even using the right image!
nogweii (3bb37ca8) at 06 May 19:38
download the kube config with flat mode
nogweii (48aa43ab) at 06 May 10:05
oh right I only installed the prod deps
nogweii (7227da43) at 06 May 09:58
symlinking didn't work, would copying?
nogweii (8bc39cb3) at 06 May 09:37
install python-docker on the remote system
... and 4 more commits
nogweii (033bc4a0) at 06 May 08:42
rename & improve SQL query for getting a version
... and 3 more commits