Skip to content

Commit d960b4c

Browse files
committed
fixups post reviews
1 parent e654e8a commit d960b4c

38 files changed

+25
-49
lines changed

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ export default [...compat.extends("scality"), {
3131
"no-param-reassign": "off",
3232
"no-empty-pattern": "off",
3333
},
34-
}];
34+
}];

lib/ListMetrics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class ListMetrics {
170170
let start = range[0];
171171
const end = range[1] || Date.now();
172172
const subRangesCount = Math.floor((end - start) / MAX_RANGE_MS) + 1;
173-
const subRanges = [];
173+
const subRanges = [];
174174
for (let i = 0; i < subRangesCount; i++) {
175175
if (i + 1 === subRangesCount) {
176176
subRanges.push([start, end]);

lib/Vault.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Vault {
5151
this._client.verifySignatureV4(
5252
stringToSign, signatureFromRequest,
5353
accessKey, region, scopeDate,
54-
{ reqUid: log.getSerializedUids(), requestContext: serializedRCs , get: true},
54+
{ reqUid: log.getSerializedUids(), requestContext: serializedRCs, get: true},
5555
(err, authInfo) => {
5656
if (err) {
5757
log.trace('error from vault', { error: err });

libV2/cache/backend/memory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class MemoryCache {
1919
this._prefix = 'utapi';
2020
this._expirations = {};
2121
}
22-
22+
2323
async connect() {
2424
return true;
2525
}
26-
26+
2727
async disconnect() {
2828
Object.values(this._expirations).forEach(clearTimeout);
2929
return true;

libV2/config/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class Config {
136136
return Array.from(
137137
new Set([
138138
...Object.keys(parent),
139-
...Object.keys(child)],
139+
...Object.keys(child)],
140140
))
141141
.reduce((ret, key) => {
142142
ret[key] = this._recursiveUpdate(parent[key], child[key]);

libV2/metadata/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ function _listObject(bucket, prefix, hydrateFunc) {
4444
let res;
4545

4646
try {
47-
4847
res = await async.retryable(ebConfig, _listingWrapper)(bucket, { ...listingParams, gt });
4948
} catch (error) {
5049
moduleLogger.error('Error during listing', { error });

libV2/process.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Process extends EventEmitter {
3737

3838
async _start() {}
3939

40-
async _join() {}
40+
async _join() {}
4141
}
4242

4343
module.exports = Process;

libV2/server/API/internal/prometheusMetrics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ collectDefaultMetrics({
55
gcDurationBuckets: [0.001, 0.01, 0.1, 1, 2, 5],
66
});
77

8-
async function prometheusMetrics(ctx) {
8+
async function prometheusMetrics(ctx) {
99
ctx.results.statusCode = 200;
1010
ctx.results.body = await register.metrics();
1111
}

libV2/server/API/metrics/ingestMetric.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function ingestMetric(ctx, params) {
1919
await Promise.all(metrics.map(m => cacheClient.pushMetric(m)));
2020
} catch {
2121
throw errors.ServiceUnavailable;
22-
}
22+
}
2323
ctx.results.statusCode = 200;
2424
}
2525

libV2/server/API/metrics/listMetrics.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ function positiveOrZero(value) {
2323
async function listMetric(ctx, params) {
2424
const labelName = serviceToWarp10Label[params.level];
2525
const resources = params.body[params.level];
26-
let [start, end] = params.body.timeRange; // eslint-disable-line prefer-const
26+
const start = params.body.timeRange[0];
27+
let end = params.body.timeRange[1];
2728
if (end === undefined) {
2829
end = Date.now();
2930
}

0 commit comments

Comments
 (0)