Rollback changes to fibers implementation

This commit is contained in:
Edimar Cardoso
2022-11-10 16:46:04 -03:00
parent f737084a56
commit 3a3dcda13e
2 changed files with 7 additions and 1 deletions

View File

@@ -1025,7 +1025,8 @@ Accounts.createUserAsync = async (options, callback) => {
// method calling Accounts.createUser could set?
//
Accounts.createUser = (options, callback) => {
Accounts.createUser = !Meteor._isFibersEnabled ? Accounts.createUserAsync
: (options, callback) => {
return Promise.await(Accounts.createUserAsync(options, callback));
};

View File

@@ -10,6 +10,11 @@ Npm.depends({
});
Package.onUse(function (api) {
if (process.env.DISABLE_FIBERS) {
api.use('ddp-server-async', 'server');
api.export('DDPServer', 'server');
return;
}
api.use(['check', 'random', 'ejson', 'underscore',
'retry', 'mongo-id', 'diff-sequence', 'ecmascript'],
'server');