Skip to content

Commit 30d4b88

Browse files
committed
imp(limiter): unblock updates workspace in db
1 parent 2ee0ecc commit 30d4b88

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

workers/limiter/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,17 @@ export default class LimiterWorker extends Worker {
164164
/**
165165
* If workspace should be blocked by quota - then do not unblock it
166166
*/
167-
const { shouldBeBlockedByQuota } = await this.prepareWorkspaceUsageUpdate(workspace, workspaceProjects);
167+
const { shouldBeBlockedByQuota, updatedWorkspace } = await this.prepareWorkspaceUsageUpdate(workspace, workspaceProjects);
168168

169169
if (shouldBeBlockedByQuota) {
170170
return;
171171
}
172172

173173
await this.dbHelper.changeWorkspaceBlockedState(event.workspaceId, false);
174+
await this.dbHelper.updateWorkspacesEventsCountAndIsBlocked([updatedWorkspace]);
174175
await this.redis.removeBannedProjects(projectIds);
175176

176-
this.sendSingleWorkspaceReport(workspaceProjects, workspace, 'unblocked');
177+
this.sendSingleWorkspaceReport(workspaceProjects, updatedWorkspace, 'unblocked');
177178
}
178179

179180
/**

0 commit comments

Comments
 (0)