Skip to content

Commit

Permalink
Remove timeout reload of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bonustrack committed May 24, 2021
1 parent 6f44f15 commit 12deac5
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions server/writer/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,10 @@ export async function verify(body): Promise<any> {

export async function action(body): Promise<void> {
const msg = jsonParse(body.msg);

try {
await storeSettings(msg.space, body);
spaces[msg.space] = msg.payload;
setTimeout(async () => {
const space = await loadSpace(msg.space);
console.log('Updated space', msg.space, space);
if (space) spaces[msg.space] = space;
}, 75e3);
} catch (e) {
console.log(e);
console.log('Failed to store settings', msg.space, e);
}
}

0 comments on commit 12deac5

Please sign in to comment.