mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-23 01:44:10 +02:00
perf: rsa sign on slacc (#17322)
* perf: rsa sign on slacc * fix: missing async/await * fix: threadPoolSize is always number Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * test(backend): init slacc in unit setup and await ap-request signing * test(backend): move slacc init to unit testEnvironment * test(backend): delete unused file * docs: update CHANGELOG * docs: fix indent Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore: migrate to vitest * fix * fix: fix changelog * chore: regenerate lockfile * docs: changelog --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,21 @@
|
||||
*/
|
||||
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { init } from 'slacc';
|
||||
import { NestLogger } from '@/NestLogger.js';
|
||||
import type { Config } from '@/config.js';
|
||||
|
||||
let slaccInitialized = false;
|
||||
|
||||
export function initExtraThreadPool(config: Config) {
|
||||
if (slaccInitialized) return;
|
||||
|
||||
const threadPoolSize = Math.max(config.threadPoolSize ?? 1, 1);
|
||||
|
||||
init(threadPoolSize);
|
||||
|
||||
slaccInitialized = true;
|
||||
}
|
||||
|
||||
export async function server() {
|
||||
const { MainModule } = await import('../MainModule.js');
|
||||
|
||||
Reference in New Issue
Block a user