@elastic.io/oih-standard-library
Advanced tools
Comparing version 0.0.10-dev.20 to 0.0.10-dev.21
export declare abstract class PollingTrigger { | ||
protected logger: any; | ||
protected emit: any; | ||
constructor(logger: any, emit: any); | ||
protected context: any; | ||
constructor(logger: any, context: any); | ||
/** | ||
@@ -6,0 +6,0 @@ * |
@@ -6,5 +6,5 @@ "use strict"; | ||
class PollingTrigger { | ||
constructor(logger, emit) { | ||
constructor(logger, context) { | ||
this.logger = logger; | ||
this.emit = emit; | ||
this.context = context; | ||
} | ||
@@ -86,7 +86,7 @@ /** | ||
this.logger.trace('Snapshot to be emitted: %j', snapshot); | ||
this.emit('snapshot', snapshot); | ||
this.context.emit('snapshot', snapshot); | ||
this.logger.debug('Finish emitting snapshot'); | ||
this.logger.info('Finished processing call to Polling Trigger'); | ||
this.logger.debug('Start emitting end'); | ||
await this.emit('end'); | ||
await this.context.emit('end'); | ||
this.logger.debug('Finish emitting end'); | ||
@@ -227,3 +227,3 @@ } | ||
this.logger.trace('Emitting new message with body: %j', r); | ||
await this.emit('data', messages.newMessageWithBody(r)); | ||
await this.context.emit('data', messages.newMessageWithBody(r)); | ||
} | ||
@@ -244,3 +244,3 @@ } | ||
this.logger.trace('Emitting new message with body: %j', results); | ||
await this.emit('data', messages.newMessageWithBody({ results })); | ||
await this.context.emit('data', messages.newMessageWithBody({ results })); | ||
this.logger.debug('Finished emitting data'); | ||
@@ -247,0 +247,0 @@ } |
@@ -10,7 +10,7 @@ import { | ||
protected emit; | ||
protected context; | ||
public constructor(logger, emit) { | ||
public constructor(logger, context) { | ||
this.logger = logger; | ||
this.emit = emit; | ||
this.context = context; | ||
} | ||
@@ -93,7 +93,7 @@ | ||
this.logger.trace('Snapshot to be emitted: %j', snapshot); | ||
this.emit('snapshot', snapshot); | ||
this.context.emit('snapshot', snapshot); | ||
this.logger.debug('Finish emitting snapshot'); | ||
this.logger.info('Finished processing call to Polling Trigger'); | ||
this.logger.debug('Start emitting end'); | ||
await this.emit('end'); | ||
await this.context.emit('end'); | ||
this.logger.debug('Finish emitting end'); | ||
@@ -242,3 +242,3 @@ } catch (e) { | ||
this.logger.trace('Emitting new message with body: %j', r); | ||
await this.emit('data', messages.newMessageWithBody(r)); | ||
await this.context.emit('data', messages.newMessageWithBody(r)); | ||
} | ||
@@ -260,3 +260,3 @@ } | ||
this.logger.trace('Emitting new message with body: %j', results); | ||
await this.emit('data', messages.newMessageWithBody({ results })); | ||
await this.context.emit('data', messages.newMessageWithBody({ results })); | ||
this.logger.debug('Finished emitting data'); | ||
@@ -263,0 +263,0 @@ } |
{ | ||
"name": "@elastic.io/oih-standard-library", | ||
"version": "0.0.10-dev.20", | ||
"version": "0.0.10-dev.21", | ||
"description": "Library for OIH standards implementation", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
169859