@codefresh-io/eventbus 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +4 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -88,7 +88,7 @@ class EventBus extends EventEmitter {
88
88
  }
89
89
 
90
90
  _emitReady() {
91
- if (this.busReady && this.storeReady) {
91
+ if (this.busReady) {
92
92
  this.readyDeferred.resolve();
93
93
  debug('ready');
94
94
  this.emit('ready');
@@ -99,9 +99,10 @@ class EventBus extends EventEmitter {
99
99
  return Promise.resolve()
100
100
  .then(async () => {
101
101
  await this.readyPromise;
102
- await this.store.save(eventName, msg);
103
102
  await this.bus.publish(eventName, msg);
104
- });
103
+ }).then(() => {
104
+ this.store.save(eventName, msg);
105
+ })
105
106
  }
106
107
 
107
108
  subscribe(eventName, handler, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefresh-io/eventbus",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {