Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"OSSEC",
"Pieter",
"Termux",
"abortable",
"autoconf",
"automake",
"backlinks",
Expand Down
70 changes: 47 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"open": "^7.0.3",
"piexifjs": "^1.0.4",
"pretty-ms": "^6.0.0",
"pull-abortable": "^4.1.1",
"pull-paramap": "^1.2.2",
"pull-sort": "^1.0.2",
"pull-stream": "^3.6.12",
Expand Down
12 changes: 3 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ const { about, blob, friend, meta, post, vote } = require("./models")({
isPublic: config.public,
});

const nameWarmup = about._startNameWarmup();

// enhance the users' input text by expanding @name to [@name](@feedPub.key)
// and slurps up blob uploads and appends a markdown link for it to the text (see handleBlobUpload)
const preparePreview = async function (ctx) {
Expand Down Expand Up @@ -1058,16 +1060,8 @@ const app = http({ host, port, middleware, allowHost });
// If we close the database after each test it throws lots of really fun "parent
// stream closing" errors everywhere and breaks the tests. :/
app._close = () => {
nameWarmup.close();
cooler.close();
// HACK: app._close is called when everything is supposed to have finished;
// cooler.close successfully stops the ssb-db process. we create a timeout
// to definitively kill the server and thereby circumvent the node process
// staying alive despite all signals pointing to the app exiting. more
// context when it was originally
// introduced in this PR: https://github.com/fraction/oasis/pull/462
setTimeout(() => {
process.exit();
}, 20000);
};

module.exports = app;
Expand Down
Loading