antietcd 1.0.0 → 1.0.1
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/README.md +3 -0
- package/antietcd-app.js +2 -0
- package/antietcd.js +4 -4
- package/etctree.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/antietcd-app.js
CHANGED
package/antietcd.js
CHANGED
|
@@ -75,7 +75,7 @@ class AntiEtcd extends EventEmitter
|
|
|
75
75
|
this.wss = new ws.WebSocketServer({ server: this.server });
|
|
76
76
|
// eslint-disable-next-line no-unused-vars
|
|
77
77
|
this.wss.on('connection', (conn, req) => this._startWebsocket(conn, null));
|
|
78
|
-
this.server.listen(this.cfg.port || 2379);
|
|
78
|
+
this.server.listen(this.cfg.port || 2379, this.cfg.ip || undefined);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
async stop()
|
|
@@ -132,11 +132,11 @@ class AntiEtcd extends EventEmitter
|
|
|
132
132
|
if (!this.cluster)
|
|
133
133
|
{
|
|
134
134
|
// Run deletion compaction without followers
|
|
135
|
-
const mod_revision = this.
|
|
136
|
-
if (mod_revision - this.
|
|
135
|
+
const mod_revision = this.etctree.mod_revision;
|
|
136
|
+
if (mod_revision - this.etctree.compact_revision > (this.cfg.compact_revisions||1000)*2)
|
|
137
137
|
{
|
|
138
138
|
const revision = mod_revision - (this.cfg.compact_revisions||1000);
|
|
139
|
-
this.
|
|
139
|
+
this.etctree.compact(revision);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
}
|
package/etctree.js
CHANGED