Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanVor committed Oct 3, 2024
1 parent 909f7ab commit 5ea9902
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
"scripts": {
"test": "jest -c config/jest.ts --passWithNoTests '.*\\.test\\.ts$'",
"lint": "eslint src config",
"lint": "eslint src/ --quiet --fix",
"build": "tsc -p .",
"generate-code": "ts-node scripts/generate-code.ts",
"check-endpoints": "ts-node scripts/check-endpoints.ts",
Expand Down
14 changes: 7 additions & 7 deletions src/utils/operation/wait-for.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { cloudApi, serviceClients } from "../..";
import { Operation } from "../../generated/yandex/cloud/operation/operation";
import { Session } from "../../session";
import { cloudApi, serviceClients } from '../..';
import { Operation } from '../../generated/yandex/cloud/operation/operation';
import { Session } from '../../session';

const {
operation: {
Expand All @@ -14,11 +14,11 @@ export const waitForOperation = (
op: Operation,
session: Session,
timeoutMs: number = DEFAULT_TIMEOUT_MS,
operationServiceEndpoint?: string
operationServiceEndpoint?: string,
): Promise<Operation> => {
const client = session.client(
serviceClients.OperationServiceClient,
operationServiceEndpoint
operationServiceEndpoint,
);
const maxChecksCount = Math.ceil(timeoutMs / session.pollInterval);

Expand All @@ -33,7 +33,7 @@ export const waitForOperation = (
{
retry: true,
retryMaxAttempts: 3,
}
},
);

checksCount++;
Expand All @@ -43,7 +43,7 @@ export const waitForOperation = (
} else if (operation.done) {
resolve(operation);
} else if (checksCount > maxChecksCount) {
reject(new Error("Timeout reached"));
reject(new Error('Timeout reached'));
} else {
setTimeout(checkOperation, session.pollInterval);
}
Expand Down

0 comments on commit 5ea9902

Please sign in to comment.