GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Revert "Removed IEventQueue" · rchcomm/Exceptionless.JavaScript@d27fb79

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/core/src
    • configuration
      • Configuration.ts
    • index.ts
    • queue
      • DefaultEventQueue.ts
      • IEventQueue.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/core/src/configuration/Configuration.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/configuration/Configuration.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { ReferenceIdPlugin } from "../plugins/default/ReferenceIdPlugin.js";
99
import { EventPluginContext } from "../plugins/EventPluginContext.js";
1010
import { IEventPlugin } from "../plugins/IEventPlugin.js";
1111
import { DefaultEventQueue } from "../queue/DefaultEventQueue.js";
12+
import { IEventQueue } from "../queue/IEventQueue.js";
1213
import { ISubmissionClient } from "../submission/ISubmissionClient.js";
1314
import { DefaultSubmissionClient } from "../submission/DefaultSubmissionClient.js";
1415
import { guid } from "../Utils.js";
@@ -545,5 +546,5 @@ interface IConfigurationServices {
545546
log: ILog;
546547
submissionClient: ISubmissionClient;
547548
storage: IStorage;
548-
queue: DefaultEventQueue;
549+
queue: IEventQueue;
549550
}
Collapse file

‎packages/core/src/index.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/index.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export { EventPluginManager } from "./plugins/EventPluginManager.js";
3939
export type { IEventPlugin } from "./plugins/IEventPlugin.js";
4040

4141
export { DefaultEventQueue } from "./queue/DefaultEventQueue.js";
42+
export type { IEventQueue } from "./queue/IEventQueue.js";
4243

4344
export { InMemoryStorage } from "./storage/InMemoryStorage.js";
4445
export { LocalStorage } from "./storage/LocalStorage.js";
Collapse file

‎packages/core/src/queue/DefaultEventQueue.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/queue/DefaultEventQueue.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import { Configuration } from "../configuration/Configuration.js";
22
import { ILog } from "../logging/ILog.js";
33
import { Event } from "../models/Event.js";
4+
import { IEventQueue } from "../queue/IEventQueue.js";
45
import { Response } from "../submission/Response.js";
56

67
interface EventQueueItem {
78
file: string,
89
event: Event
910
}
1011

11-
export class DefaultEventQueue {
12+
export class DefaultEventQueue implements IEventQueue {
1213
/**
1314
* A list of handlers that will be fired when events are submitted.
1415
* @type {Array}
Collapse file

‎packages/core/src/queue/IEventQueue.ts‎

Copy file name to clipboard
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Event } from "../models/Event.js";
2+
import { Response } from "../submission/Response.js";
3+
4+
export interface IEventQueue {
5+
/** Enqueue an event */
6+
enqueue(event: Event): Promise<void>;
7+
/** Processes all events in the queue */
8+
process(): Promise<void>;
9+
/** Starts queue timers */
10+
startup(): Promise<void>;
11+
/** Suspends queue timers */
12+
suspend(): Promise<void>;
13+
/** Suspends processing of events for a specific duration */
14+
suspendProcessing(durationInMinutes?: number, discardFutureQueuedItems?: boolean, clearQueue?: boolean): Promise<void>;
15+
// TODO: See if this makes sense.
16+
onEventsPosted(handler: (events: Event[], response: Response) => Promise<void>): void;
17+
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.