Further updated on caching. Small change in DB schema to make lookups a bit more performant. Note that if DB migration in the last commit has been run, this commit will need manual update of the database.

This commit is contained in:
Tomas Bures 2019-04-22 15:41:39 +02:00
parent ef0464bbc9
commit 3e3c3a24fe
4 changed files with 20 additions and 23 deletions

View file

@ -87,15 +87,6 @@ async function init() {
await shares.regenerateRoleNamesTable();
await shares.rebuildPermissions();
await executor.spawn();
await testServer.spawn();
await verpServer.spawn();
await builtinZoneMta.spawn();
await startHTTPServer(AppType.TRUSTED, 'trusted', trustedPort);
await startHTTPServer(AppType.SANDBOXED, 'sandbox', sandboxPort);
await startHTTPServer(AppType.PUBLIC, 'public', publicPort);
await privilegeHelpers.ensureMailtrainDir(filesDir);
// Update owner of all files under 'files' dir. This should not be necessary, but when files are copied over,
@ -104,10 +95,17 @@ async function init() {
await privilegeHelpers.ensureMailtrainOwner(dirEnt.path);
}
await privilegeHelpers.ensureMailtrainDir(uploadedFilesDir);
await privilegeHelpers.ensureMailtrainDir(reportFilesDir);
await executor.spawn();
await testServer.spawn();
await verpServer.spawn();
await builtinZoneMta.spawn();
await startHTTPServer(AppType.TRUSTED, 'trusted', trustedPort);
await startHTTPServer(AppType.SANDBOXED, 'sandbox', sandboxPort);
await startHTTPServer(AppType.PUBLIC, 'public', publicPort);
privilegeHelpers.dropRootPrivileges();