mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
workspace: bump package version
This commit is contained in:
1 parent
bb288cb960
commit
c394378dba
22 files changed
+32
-42
No files matched your search
@@ -2,7 +2,7 @@ import {
|
||||
Context, DomainModel, iterateAllProblem, iterateAllProblemInDomain,
|
||||
Logger, Schema, SystemModel,
|
||||
} from 'hydrooj';
|
||||
import * as SonicService from './service';
|
||||
import { SonicService } from './service';
|
||||
|
||||
const logger = new Logger('sonic');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/sonic",
|
||||
"version": "1.2.7",
|
||||
"version": "1.3.0",
|
||||
"description": "Sonic search service",
|
||||
"main": "index.ts",
|
||||
"preferUnplugged": true,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user