mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-05 04:15:55 +02:00
enhance(dev): improve mem report (#17118)
* wip * wip * Update report-backend-memory.yml * Update report-backend-memory.yml * Update .github/workflows/report-backend-memory.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -86,9 +86,17 @@ if (!envOption.disableClustering) {
|
||||
ev.mount();
|
||||
}
|
||||
|
||||
if (envOption.forceGc && global.gc != null) {
|
||||
global.gc();
|
||||
}
|
||||
process.on('message', msg => {
|
||||
if (msg === 'gc') {
|
||||
if (global.gc != null) {
|
||||
logger.info('Manual GC triggered');
|
||||
global.gc();
|
||||
if (process.send != null) process.send('gc ok');
|
||||
} else {
|
||||
logger.warn('Manual GC requested but gc is not available. Start the process with --expose-gc to enable this feature.');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
readyRef.value = true;
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ const envOption = {
|
||||
verbose: false,
|
||||
withLogTime: false,
|
||||
quiet: false,
|
||||
forceGc: false,
|
||||
};
|
||||
|
||||
for (const key of Object.keys(envOption) as (keyof typeof envOption)[]) {
|
||||
|
||||
Reference in New Issue
Block a user