Skip to content

Commit d297f3b

Browse files
authored
Merge pull request #492 from codex-team/unblock-workspace
imp(resolvers): unblock workspace on change plan to default
2 parents 9157d29 + ef90f6c commit d297f3b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hawk.api",
3-
"version": "1.1.21",
3+
"version": "1.1.22",
44
"main": "index.ts",
55
"license": "UNLICENSED",
66
"scripts": {

src/resolvers/workspace.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import ProjectToWorkspace from '../models/projectToWorkspace';
99
import Validator from '../utils/validator';
1010
import { dateFromObjectId } from '../utils/dates';
1111
import cloudPaymentsApi from '../utils/cloudPaymentsApi';
12+
import { publish } from '../rabbitmq';
1213

1314
const { ApolloError, UserInputError, ForbiddenError } = require('apollo-server-express');
1415
const crypto = require('crypto');
@@ -382,6 +383,14 @@ module.exports = {
382383

383384
telegram.sendMessage(message);
384385

386+
/**
387+
* Unblock workspace in limiter
388+
*/
389+
await publish('cron-tasks', 'cron-tasks/limiter', JSON.stringify({
390+
type: 'unblock-workspace',
391+
workspaceId: workspaceModel._id.toString(),
392+
}));
393+
385394
const updatedWorkspaceModel = await factories.workspacesFactory.findById(workspaceId);
386395

387396
return {

0 commit comments

Comments
 (0)