Skip to content

Commit

Permalink
fix(enterprise): fix final log entry flush
Browse files Browse the repository at this point in the history
  • Loading branch information
thsig authored and eysi09 committed Jun 27, 2020
1 parent 419abef commit 996a238
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions garden-service/src/enterprise/buffered-event-stream.ts
Expand Up @@ -155,7 +155,7 @@ export class BufferedEventStream {
}

// Note: Returns a promise.
flushEvents(events: StreamEvent[]) {
async flushEvents(events: StreamEvent[]) {
if (events.length === 0) {
return
}
Expand All @@ -170,13 +170,13 @@ export class BufferedEventStream {
this.log.silly(`--------`)
this.log.silly(`data: ${JSON.stringify(data)}`)
this.log.silly(`--------`)
return got.post(`${this.enterpriseDomain}/events`, { json: data, headers }).catch((err) => {
await got.post(`${this.enterpriseDomain}/events`, { json: data, headers }).catch((err) => {
this.log.error(err)
})
}

// Note: Returns a promise.
flushLogEntries(logEntries: LogEntryEvent[]) {
async flushLogEntries(logEntries: LogEntryEvent[]) {
if (logEntries.length === 0) {
return
}
Expand All @@ -191,7 +191,7 @@ export class BufferedEventStream {
this.log.silly(`--------`)
this.log.silly(`data: ${JSON.stringify(data)}`)
this.log.silly(`--------`)
got.post(`${this.enterpriseDomain}/log-entries`, { json: data, headers }).catch((err) => {
await got.post(`${this.enterpriseDomain}/log-entries`, { json: data, headers }).catch((err) => {
this.log.error(err)
})
}
Expand Down

0 comments on commit 996a238

Please sign in to comment.