mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-24 12:39:04 +01:00
Summary: Ref T4324. The server code is probably going to get a fair amount more complicated, so allow it to load Javelin classes in a mostly-reasonable way. This integration has a few warts, but should be good enough to let us manage complexity through the next iteration of the server. (Mostly I just want the concicse Javelin mechanism for defining new classes.) Version bump is just so I can figure stuff out if this creates any issues for users based on which version of things they're running. Test Plan: Started server, posted some messages through it. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T4324 Differential Revision: https://secure.phabricator.com/D8253
18 lines
292 B
JavaScript
18 lines
292 B
JavaScript
var JX = require('javelin').JX;
|
|
|
|
JX.install('AphlictIDGenerator', {
|
|
|
|
members : {
|
|
_next : 0,
|
|
|
|
generateNext : function() {
|
|
this._next = ((this._next + 1) % 1000000000000);
|
|
return this._next;
|
|
},
|
|
|
|
getTotalCount : function() {
|
|
return this._next;
|
|
}
|
|
}
|
|
|
|
});
|