Skip to content

Commit

Permalink
version bump + diagnostics stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed Feb 8, 2021
1 parent a8cb2cf commit 2a06c46
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
- [x] perf chart: changed color scheme
- [x] perf chart: change padding
- [x] perf chart: added server reset lines
- [x] merge some prs (language, redm, minor)
- [x] add koa sessions and server log to the diagnostics page


> ASAP!:
- [ ] deal with the last 2 PRs
- [ ] consolidate the log pages
- [ ] add discord group whitelist (whitelist switch becomes a select box that will enable guildID and roleID)
- Manual Approval (default)
Expand All @@ -39,7 +40,6 @@
- this message id can be stored in the config file
- if discord id is present, use that instead of name (careful with the pings!)
- [ ] send log via FD3
- [ ] add RedM compatibility
- [ ] add `.editorconfig`
- [ ] create auto backup of the database
- [ ] ignore key bindings commands https://discord.com/channels/577993482761928734/766868363041046589/795420910713831446
Expand Down
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
author 'Tabarra'
description 'Remotely Manage & Monitor your GTA5 FiveM Server'
repository 'https://github.com/tabarra/txAdmin'
version '3.2.3'
version '3.3.0'

rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.'
fx_version 'bodacious'
Expand Down
3 changes: 2 additions & 1 deletion src/components/playerController/playerlistGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = class PlayerlistGenerator {
//Configs
this.config = {
srcPlayerlist: require('./playerlist.ignore.json'),
refreshInterval: 2500,
refreshInterval: 2*60*1000, //2500
shouldAddRemovePlayers: true,
minPlayers: 7,
maxPlayers: 15,
Expand All @@ -33,6 +33,7 @@ module.exports = class PlayerlistGenerator {


//Cron functions
this.playerlist = this.refreshPlayers();
setInterval(() => {
this.playerlist = this.refreshPlayers();
}, this.config.refreshInterval);
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ if(typeof txAdminVersion !== 'string' || txAdminVersion == 'null'){
//Check if this version of txAdmin is too outdated to be considered safe to use in prod
//NOTE: Only valid if its being very actively maintained.
// Use 30d for patch 0, or 45~60d otherwise
const txAdminVersionBestBy = 1610430000 + (27 * 86400);
// dir(new Date(txAdminVersionBestBy*1000).toLocaleString()) // 08/02/2021 03:40:00 BRT
const txAdminVersionBestBy = 1612770000 + (28 * 86400);
// dir(new Date(txAdminVersionBestBy*1000).toLocaleString()) // 08/03/2021 04:40:00 BRT
if(now() > txAdminVersionBestBy){
logError(`This version of txAdmin is outdated.`);
logError(`Please update as soon as possible.`);
Expand Down
5 changes: 5 additions & 0 deletions src/webroutes/diagnostics.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ async function gettxAdminData(){
hbHTTPFails: globals.databus.txStatsData.heartBeatStats.httpFailed,
hbBootSeconds: globals.databus.txStatsData.bootSeconds.join(', ') || '--',
logFileSize,

//Possible memory leaks:
serverLogSize: globals.databus.serverLog.length || '--',
koaSessions: Object.keys(globals.webServer.koaSessionMemoryStore.sessions).length || '--',

//Settings
cooldown: globals.monitor.config.cooldown,
schedule: globals.monitor.config.restarterSchedule.join(', ') || '--',
Expand Down
6 changes: 5 additions & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.2.2",
"version": "3.3.0",
"changelog": "Deprecated Message. Please Update to v3.",
"allVersions": [
{
Expand Down Expand Up @@ -237,6 +237,10 @@
{
"version": "3.2.3",
"changelog": "Improved chart player count consistency. Made the chart responsive. Reverted dark mode as default."
},
{
"version": "3.3.0",
"changelog": "Improved chart. Added RedM compatibility. Added Bosnian and Persian. Minor stuff."
}
]
}
2 changes: 2 additions & 0 deletions web/diagnostics.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ <h5>Stats:</h5>
<strong>HB Fails:</strong> <code>HTTP {{it.txadmin.hbHTTPFails}}</code> / <code>FD3 {{it.txadmin.hbFD3Fails}}</code> <br>
<strong>Boot Seconds:</strong> <code>{{it.txadmin.hbBootSeconds}}</code> <br>
<strong>FXServer Log Size:</strong> <code>{{it.txadmin.logFileSize}}</code> <br>
<strong>Server Log Size:</strong> <code>{{it.txadmin.serverLogSize}}</code> <br>
<strong>Koa Sessions:</strong> <code>{{it.txadmin.koaSessions}}</code> <br>
<hr>
<h5>Settings:</h5>
<strong>Schedule:</strong> <code>{{it.txadmin.schedule}}</code> <br>
Expand Down

0 comments on commit 2a06c46

Please sign in to comment.