Skip to content

Commit

Permalink
crons now run with permissions command context
Browse files Browse the repository at this point in the history
  • Loading branch information
daneryl committed May 25, 2021
1 parent ae14cef commit ccf926a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { multitenantMiddleware } from './api/utils/multitenantMiddleware';
import { staticFilesMiddleware } from './api/utils/staticFilesMiddleware';
import { customUploadsPath, uploadsPath } from './api/files/filesystem';
import { tocService } from './api/toc_generation/tocService';
import { permissionsContext } from './api/permissions/permissionsContext';

mongoose.Promise = Promise;

Expand Down Expand Up @@ -114,6 +115,7 @@ DB.connect(config.DBHOST, dbAuth).then(async () => {

http.listen(port, bindAddress, async () => {
await tenants.run(async () => {
permissionsContext.setCommandContext();
if (!config.multiTenant && !config.clusterMode) {
syncWorker.start();

Expand Down

0 comments on commit ccf926a

Please sign in to comment.