aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/event.model.ts2
-rw-r--r--lib/event.schema.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/event.model.ts b/lib/event.model.ts
index 7768ffc..1b6d324 100644
--- a/lib/event.model.ts
+++ b/lib/event.model.ts
@@ -5,7 +5,7 @@ import { LogDocument } from './log.schema';
import LogModel from './log.model';
export interface Event<Context> extends EventDocument<Context> {
- log(message: string): void;
+ log(message: string): Promise<LogDocument>;
start(): void;
complete(): void;
fail(error: Error | string): void;
diff --git a/lib/event.schema.ts b/lib/event.schema.ts
index 0f428fd..8b9db8b 100644
--- a/lib/event.schema.ts
+++ b/lib/event.schema.ts
@@ -3,7 +3,7 @@ import { Schema, Document } from 'mongoose';
export interface EventDocument<Context> extends Document {
type: string;
schedule: string;
- status: 'notStarted' | 'running' | 'complete' | 'failed';
+ status?: 'notStarted' | 'running' | 'complete' | 'failed';
error?: string;
context: Context;
nextRunAt?: Date;