|
@@ -19,7 +19,7 @@ export class CronsService {
|
|
return this.getCollections(WS_EVENTS.COLLECTION);
|
|
return this.getCollections(WS_EVENTS.COLLECTION);
|
|
}
|
|
}
|
|
if (!cronJobEntity) {
|
|
if (!cronJobEntity) {
|
|
- throw new Error('No existed job entity');
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
return Number(type) === WS_EVENTS_TYPE.STOP
|
|
return Number(type) === WS_EVENTS_TYPE.STOP
|
|
? cronJobEntity.stop()
|
|
? cronJobEntity.stop()
|
|
@@ -42,10 +42,6 @@ export class CronsService {
|
|
return res;
|
|
return res;
|
|
} catch (error) {
|
|
} catch (error) {
|
|
// When user not connect milvus, stop cron
|
|
// When user not connect milvus, stop cron
|
|
- // this.toggleCronJobByName({
|
|
|
|
- // name: WS_EVENTS.COLLECTION,
|
|
|
|
- // type: WS_EVENTS_TYPE.STOP,
|
|
|
|
- // });
|
|
|
|
const cronJobEntity = this.schedulerRegistry.getCronJob(name);
|
|
const cronJobEntity = this.schedulerRegistry.getCronJob(name);
|
|
if (cronJobEntity) {
|
|
if (cronJobEntity) {
|
|
cronJobEntity.stop();
|
|
cronJobEntity.stop();
|