mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor: ♻️ Use node:cluster instead of Web Workers
This commit is contained in:
parent
3279f3098b
commit
0a1c2b8cb3
3 changed files with 18 additions and 18 deletions
|
|
@ -27,6 +27,7 @@ export enum SonicIndexType {
|
|||
export class SonicSearchManager {
|
||||
private searchChannel: SonicChannelSearch;
|
||||
private ingestChannel: SonicChannelIngest;
|
||||
private connected = false;
|
||||
private logger = getLogger("sonic");
|
||||
|
||||
/**
|
||||
|
|
@ -55,6 +56,10 @@ export class SonicSearchManager {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.connected) {
|
||||
return;
|
||||
}
|
||||
|
||||
!silent && this.logger.info`Connecting to Sonic...`;
|
||||
|
||||
// Connect to Sonic
|
||||
|
|
@ -110,6 +115,7 @@ export class SonicSearchManager {
|
|||
this.searchChannel.ping(),
|
||||
this.ingestChannel.ping(),
|
||||
]);
|
||||
this.connected = true;
|
||||
!silent && this.logger.info`Connected to Sonic`;
|
||||
} catch (error) {
|
||||
this.logger.fatal`Error while connecting to Sonic: ${error}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue