Skip to content

Commit 13f9ba6

Browse files
committed
fix: lint
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
1 parent 11cf610 commit 13f9ba6

2 files changed

Lines changed: 40 additions & 28 deletions

File tree

backend/src/database/repositories/organizationRepository.ts

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,15 +1600,18 @@ class OrganizationRepository {
16001600
const result = { rows, count, limit, offset }
16011601

16021602
// Cache the result
1603-
options.log.info({
1604-
cacheKey,
1605-
segmentId,
1606-
rowCount: rows.length,
1607-
totalCount: count,
1608-
jsonSizeBytes: JSON.stringify(result).length,
1609-
limit,
1610-
offset,
1611-
}, `Caching organizations advanced query result: ${cacheKey}`)
1603+
options.log.info(
1604+
{
1605+
cacheKey,
1606+
segmentId,
1607+
rowCount: rows.length,
1608+
totalCount: count,
1609+
jsonSizeBytes: JSON.stringify(result).length,
1610+
limit,
1611+
offset,
1612+
},
1613+
`Caching organizations advanced query result: ${cacheKey}`,
1614+
)
16121615
await cache.set(cacheKey, result, 21600) // 6 hours TTL
16131616

16141617
return result
@@ -1672,11 +1675,14 @@ class OrganizationRepository {
16721675
options: IRepositoryOptions,
16731676
): Promise<void> {
16741677
OrganizationRepository.activeBackgroundRefreshes++
1675-
options.log.info({
1676-
cacheKey,
1677-
segmentId: params.segmentId,
1678-
activeBackgroundRefreshes: OrganizationRepository.activeBackgroundRefreshes,
1679-
}, `Refreshing organizations advanced query cache in background: ${cacheKey}`)
1678+
options.log.info(
1679+
{
1680+
cacheKey,
1681+
segmentId: params.segmentId,
1682+
activeBackgroundRefreshes: OrganizationRepository.activeBackgroundRefreshes,
1683+
},
1684+
`Refreshing organizations advanced query cache in background: ${cacheKey}`,
1685+
)
16801686
try {
16811687
await this.executeQuery(cache, cacheKey, params, options)
16821688
} catch (error) {

services/libs/data-access-layer/src/members/base.ts

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -538,15 +538,18 @@ export async function executeQuery(
538538
const result = { rows, count, limit, offset }
539539

540540
// Cache the result
541-
log.info({
542-
cacheKey,
543-
segmentId,
544-
rowCount: rows.length,
545-
totalCount: count,
546-
jsonSizeBytes: JSON.stringify(result).length,
547-
limit,
548-
offset,
549-
}, `Caching members advanced query result: ${cacheKey}`)
541+
log.info(
542+
{
543+
cacheKey,
544+
segmentId,
545+
rowCount: rows.length,
546+
totalCount: count,
547+
jsonSizeBytes: JSON.stringify(result).length,
548+
limit,
549+
offset,
550+
},
551+
`Caching members advanced query result: ${cacheKey}`,
552+
)
550553
await cache.set(cacheKey, result, 21600) // 6 hours TTL
551554

552555
return result
@@ -561,11 +564,14 @@ async function refreshCacheInBackground(
561564
params: IQueryMembersAdvancedParams,
562565
): Promise<void> {
563566
activeBackgroundRefreshes++
564-
log.info({
565-
cacheKey,
566-
segmentId: params.segmentId,
567-
activeBackgroundRefreshes,
568-
}, `Refreshing members advanced query cache in background: ${cacheKey}`)
567+
log.info(
568+
{
569+
cacheKey,
570+
segmentId: params.segmentId,
571+
activeBackgroundRefreshes,
572+
},
573+
`Refreshing members advanced query cache in background: ${cacheKey}`,
574+
)
569575
try {
570576
await executeQuery(qx, redis, cacheKey, params)
571577
} catch (error) {

0 commit comments

Comments
 (0)