Skip to content

Commit b34b8ef

Browse files
committed
clean: remove some unused variables
1 parent cb4bcba commit b34b8ef

10 files changed

+2
-21
lines changed

src/backend/src/CoreModule.js

-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ const install = async ({ services, app, useapi, modapi }) => {
364364
}
365365

366366
const install_legacy = async ({ services }) => {
367-
// const { FilesystemService } = require('./filesystem/FilesystemService');
368367
const PerformanceMonitor = require('./monitor/PerformanceMonitor');
369368
const { OperationTraceService } = require('./services/OperationTraceService');
370369
const { ClientOperationService } = require('./services/ClientOperationService');

src/backend/src/Kernel.js

-4
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ class Kernel extends AdvancedBase {
7979

8080
this._runtime_init({ args });
8181

82-
// const express = require('express')
83-
// const app = express();
8482
const config = require('./config');
8583

8684
globalThis.ll = o => o;
@@ -113,7 +111,6 @@ class Kernel extends AdvancedBase {
113111

114112
const services = new Container({ logger: this.bootLogger });
115113
this.services = services;
116-
// app.set('services', services);
117114

118115
const root_context = Context.create({
119116
environment: this.environment,
@@ -131,7 +128,6 @@ class Kernel extends AdvancedBase {
131128
});
132129

133130

134-
// Error.stackTraceLimit = Infinity;
135131
Error.stackTraceLimit = 200;
136132
}
137133

src/backend/src/boot/RuntimeEnvironment.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -233,18 +233,14 @@ class RuntimeEnvironment extends AdvancedBase {
233233
]
234234
);
235235

236+
// Note: there used to be a 'mods_path_entry' here too
237+
// but it was never used
236238
const pwd_path_entry = this.get_first_suitable_path_(
237239
{ pathFor: 'working directory' },
238240
this.runtime_paths,
239241
[ this.path_checks.require_write_permission ]
240242
);
241243

242-
const mods_path_entry = this.get_first_suitable_path_(
243-
{ pathFor: 'mods', optional: true },
244-
this.mod_paths,
245-
[ this.path_checks.require_read_permission ],
246-
);
247-
248244
process.chdir(pwd_path_entry.path);
249245

250246
// Check for a valid config file in the config path

src/backend/src/modules/core/ExpectationService.js

-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ class ExpectationService extends BaseService {
8383
* @returns {Promise<void>} A promise that resolves when initialization is complete.
8484
*/
8585
async _init () {
86-
const services = this.services;
87-
8886
// TODO: service to track all interval functions?
8987
/**
9088
* Initializes the service by setting up interval functions and registering commands.

src/backend/src/modules/core/PagerService.js

-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ class PagerService extends BaseService {
5959
* @returns {Promise<void>}
6060
*/
6161
async _init () {
62-
const services = this.services;
63-
6462
this.alertHandlers_ = [];
6563

6664
if ( ! this.config ) {

src/backend/src/modules/core/ServerHealthService.js

-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ class ServerHealthService extends BaseService {
7272
*/
7373

7474

75-
const min_free_KiB = 1024 * 1024; // 1 GiB
7675
const min_available_KiB = 1024 * 1024 * 2; // 2 GiB
7776

7877
const svc_alarm = this.services.get('alarm');

src/backend/src/modules/puterai/AWSTextractService.js

-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ class AWSTextractService extends BaseService {
185185

186186
const try_buffer = await file_facade.get('buffer');
187187
if ( try_buffer ) {
188-
const base64 = try_buffer.toString('base64');
189188
return {
190189
client: this._get_client(),
191190
document: {

src/backend/src/modules/selfhosted/ComplainAboutVersionsService.js

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class ComplainAboutVersionsService extends BaseService {
6161
let timeago = (() => {
6262
let years = cur_date_obj.getFullYear() - eol_date.getFullYear();
6363
let months = cur_date_obj.getMonth() - eol_date.getMonth();
64-
let days = cur_date_obj.getDate() - eol_date.getDate();
6564

6665
let str = '';
6766
while ( years > 0 ) {

src/backend/src/modules/web/SocketioService.js

-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ class SocketioService extends BaseService {
4040
* @returns {Promise<void>}
4141
*/
4242
async send (socket_specifiers, key, data) {
43-
const svc_getUser = this.services.get('get-user');
44-
4543
if ( ! Array.isArray(socket_specifiers) ) {
4644
socket_specifiers = [socket_specifiers];
4745
}

src/backend/src/modules/web/WebServerService.js

-1
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ class WebServerService extends BaseService {
625625
const lines = last_logo.txt.split('\n');
626626
const width = process.stdout.columns;
627627
const pad = (width - last_logo.sz) / 2;
628-
const asymmetrical = pad % 1 !== 0;
629628
const pad_left = Math.floor(pad);
630629
const pad_right = Math.ceil(pad);
631630
for ( let i = 0 ; i < lines.length ; i++ ) {

0 commit comments

Comments
 (0)