Skip to content

Commit

Permalink
only flush once
Browse files Browse the repository at this point in the history
  • Loading branch information
asjongers committed Jun 4, 2018
1 parent 04737ec commit a94e76a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions utils/watchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ async function watchDataSubjects () {
dataSubjectId,
Date.now()
)
producer.flush()
} catch (error) {
console.error("An error occurred when trying to send message to Kafka topic [%s]: %s", changeLogsTopic, error)
console.error(error)
Expand All @@ -223,11 +222,11 @@ async function watchDataSubjects () {
dataSubjectId, // To ensure we only keep the latest set of policies
Date.now()
)
producer.flush()
} catch (error) {
console.error("An error occurred when trying to send message to Kafka topic [%s]: %s", fullPolicyTopic, error)
console.error(error)
}
producer.flush()
}, () => {
return conn.close()
})
Expand Down

0 comments on commit a94e76a

Please sign in to comment.