mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2025-12-14 02:35:06 +00:00
Add screenshot tester
This commit is contained in:
@@ -14,6 +14,7 @@ class TtlCache {
|
||||
this.sweepInterval = setInterval(() => {
|
||||
this.clean()
|
||||
}, constants.caching.cache_sweep_interval)
|
||||
this.sweepInterval.unref()
|
||||
}
|
||||
|
||||
clean() {
|
||||
|
||||
@@ -13,7 +13,7 @@ setInterval((new (function() {
|
||||
for (const waiter of waiters.values()) {
|
||||
waiter.stream.push(payload)
|
||||
}
|
||||
})).constructor, 50000)
|
||||
})).constructor, 50000).unref()
|
||||
|
||||
class Waiter {
|
||||
constructor(username) {
|
||||
|
||||
@@ -7,7 +7,7 @@ setInterval((new (function() {
|
||||
for (const stream of streams.values()) {
|
||||
stream.push(payload)
|
||||
}
|
||||
})).constructor, 50000)
|
||||
})).constructor, 50000).unref()
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ function cleanCSRF() {
|
||||
db.prepare("DELETE FROM CSRFTokens WHERE expires <= ?").run(Date.now())
|
||||
}
|
||||
cleanCSRF()
|
||||
setInterval(cleanCSRF, constants.caching.csrf_time)
|
||||
setInterval(cleanCSRF, constants.caching.csrf_time).unref()
|
||||
|
||||
module.exports.getToken = getToken
|
||||
module.exports.getSettings = getSettings
|
||||
|
||||
@@ -26,6 +26,8 @@ const pinski = new Pinski({
|
||||
onionLocation: constants.onion_location
|
||||
})
|
||||
|
||||
pinski.startServer()
|
||||
|
||||
subdirs("pug", async (err, dirs) => {
|
||||
if (err) throw err
|
||||
|
||||
@@ -60,8 +62,6 @@ subdirs("pug", async (err, dirs) => {
|
||||
pinski.addAPIDir("assistant_api")
|
||||
}
|
||||
|
||||
pinski.startServer()
|
||||
|
||||
require("pinski/plugins").setInstance(pinski)
|
||||
|
||||
Object.assign(passthrough, pinski.getExports())
|
||||
@@ -74,3 +74,5 @@ subdirs("pug", async (err, dirs) => {
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = pinski
|
||||
|
||||
Reference in New Issue
Block a user