diff --git a/ecosystem.config.js b/ecosystem.config.js index 294d6c70..8e1c872b 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -3,7 +3,11 @@ module.exports = { apps : [{ name: 'build-worker', script: 'worker.js', - instances: 1, //could increase if building is getting backed up + instances: 1, + /* + increase instances if building is getting backed up, + best to keep at numCPUs-1 to prevent server choke under high load though. + */ autorestart: true, watch: false, max_memory_restart: '1G', @@ -32,7 +36,7 @@ module.exports = { } }, { name: 'schedules', - script: 'schedules.js', + script: 'schedules/index.js', instances: 1, autorestart: true, watch: false, diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index e41ee381..16ef2d70 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -82,6 +82,9 @@ pre { .text-center { text-align: center; } +.pr-20 { + padding-right: 20px; +} .ml-1 { margin-left: 1px; } @@ -728,13 +731,13 @@ hr + .thread { table.boardtable td:nth-child(3),table.boardtable td:nth-child(4),table.boardtable td:nth-child(5), table.boardtable th:nth-child(3),table.boardtable th:nth-child(4),table.boardtable th:nth-child(5) { - min-width: 90px; + min-width: 50px; } @media only screen and (max-width: 600px) { table.boardtable td:nth-child(3), table.boardtable th:nth-child(3), - table.boardtable td:nth-child(4), table.boardtable th:nth-child(4) { + table.boardtable td:nth-child(5), table.boardtable th:nth-child(5) { display: none; } diff --git a/schedules.js b/schedules/index.js similarity index 68% rename from schedules.js rename to schedules/index.js index 9a01fafc..975e6ca2 100644 --- a/schedules.js +++ b/schedules/index.js @@ -4,9 +4,9 @@ process .on('uncaughtException', console.error) .on('unhandledRejection', console.error); -const msTime = require(__dirname+'/helpers/mstime.js') - , Mongo = require(__dirname+'/db/db.js') - , { enableWebring } = require(__dirname+'/configs/main.json'); +const msTime = require(__dirname+'/../helpers/mstime.js') + , Mongo = require(__dirname+'/../db/db.js') + , { enableWebring } = require(__dirname+'/../configs/main.json'); (async () => { @@ -15,7 +15,7 @@ const msTime = require(__dirname+'/helpers/mstime.js') console.log('STARTING SCHEDULES'); //delete files for expired captchas - const deleteCaptchas = require(__dirname+'/schedules/deletecaptchas.js'); + const deleteCaptchas = require(__dirname+'/deletecaptchas.js'); deleteCaptchas().catch(e => console.error); setInterval(() => { deleteCaptchas().catch(e => console.error); @@ -23,7 +23,7 @@ const msTime = require(__dirname+'/helpers/mstime.js') //update webring if (enableWebring) { - const updateWebring = require(__dirname+'/schedules/webring.js'); + const updateWebring = require(__dirname+'/webring.js'); updateWebring().catch(e => console.error); setInterval(() => { updateWebring().catch(e => console.error); @@ -31,7 +31,7 @@ const msTime = require(__dirname+'/helpers/mstime.js') } //update board stats and homepage - const taskQueue = require(__dirname+'/queue.js'); + const taskQueue = require(__dirname+'/../queue.js'); taskQueue.push({ 'task': 'updateStats', 'options': {} @@ -42,7 +42,7 @@ const msTime = require(__dirname+'/helpers/mstime.js') }); //file pruning - const pruneFiles = require(__dirname+'/schedules/prune.js'); + const pruneFiles = require(__dirname+'/prune.js'); pruneFiles().catch(e => console.error); setInterval(() => { pruneFiles().catch(e => console.error); diff --git a/views/pages/home.pug b/views/pages/home.pug index 82043687..07c2afb3 100644 --- a/views/pages/home.pug +++ b/views/pages/home.pug @@ -28,8 +28,8 @@ block content th Board th Description th.help(title='Posts in the last hour') PPH - th.help(title='Unique posters in the last 24h') Active Users - th Total Posts + th.help(title='Unique posters in the last 24h') Users + th Posts each board in boards tr td @@ -45,7 +45,7 @@ block content tr.help(title='Total stats including unlisted boards') th Total Posts th Total PPH - th Active Users + th Total Users th Active Content tr td #{totalStats.posts} @@ -71,8 +71,8 @@ block content th Board th Description th.help(title='Posts in the last hour') PPH - th.help(title='Unique posters in the last 24h') Active Users - th Total Posts + th.help(title='Unique posters in the last 24h') Users + th.pr-20 Posts each board in webringBoards tr td @@ -82,6 +82,6 @@ block content td #{board.subtitle || '-'} td #{board.postsPerHour || '-'} td #{board.uniqueUsers || '-'} - td #{board.totalPosts || '-'} + td.pr-20 #{board.totalPosts || '-'} p small: a(href='https://gitlab.com/alogware/LynxChanAddon-Webring') webring?