move schedules to their own folder with an index file

merge-requests/208/head
fatchan 5 years ago
parent 85de95bc31
commit 1bb03ea6ff
  1. 8
      ecosystem.config.js
  2. 7
      gulp/res/css/style.css
  3. 14
      schedules/index.js
  4. 12
      views/pages/home.pug

@ -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,

@ -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;
}

@ -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);

@ -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?

Loading…
Cancel
Save