keuss 2.0.1 → 2.0.3

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.
package/QFactory.js CHANGED
@@ -130,7 +130,7 @@ class QFactory {
130
130
 
131
131
  _.each (ql, (v, k) => {
132
132
  debug ('%s: recreating topology: adding queue %s with opts %o', this._name, k, v.opts);
133
- ret[k] = cb => this.queue (k, v.opts, cb); // TODO fix to async
133
+ tasks[k] = cb => this.queue (k, v.opts, cb);
134
134
  });
135
135
 
136
136
  async.parallel (tasks, cb);
@@ -43,7 +43,16 @@ class PGQueue extends Queue {
43
43
  reserved TIMESTAMPTZ
44
44
  );
45
45
  CREATE INDEX IF NOT EXISTS idx_${this._tbl_name}_mature ON ${this._tbl_name} (mature);
46
- `, err => cb (err));
46
+ `, err => {
47
+ if (err){
48
+ // ignore catalog issues on concurrent table creation
49
+ // (duplicate key value violates unique constraint "pg_type_typname_nsp_index")
50
+ if (err.code == '23505') return cb()
51
+ return cb(err);
52
+ }
53
+
54
+ cb ();
55
+ });
47
56
  }
48
57
 
49
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keuss",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "keywords": [
5
5
  "queue",
6
6
  "persistent",