workspace: bump package version

This commit is contained in:
undefined committed 2022-10-05 20:16:39 +08:00
1 parent bb288cb960
commit c394378dba
22 files changed
+32 -42

No files matched your search

+5 -9
View File
@@ -40,11 +40,15 @@ function getHandler(type: string, that: any) {
};
}
class SonicService extends Service {
export class SonicService extends Service {
public search: Search;
public ingest: Ingest;
public error = '';
constructor(ctx: Context) {
super(ctx, 'sonic', true);
}
async start() {
const [host, port, auth] = SystemModel.getMany(['sonic.host', 'sonic.port', 'sonic.auth']);
const cfg = {
@@ -54,10 +58,6 @@ class SonicService extends Service {
};
this.search = new Search(cfg);
this.ingest = new Ingest(cfg);
await this.connect();
}
async connect() {
try {
this.search.connect(getHandler('search', this));
this.ingest.connect(getHandler('ingest', this));
@@ -107,7 +107,3 @@ class SonicService extends Service {
]);
}
}
export function apply() {
Context.service('sonic', SonicService);
}