refactor: rename arg name
This commit is contained in:
parent
7dd5372337
commit
19c00e00f7
1 changed files with 3 additions and 3 deletions
|
@ -303,7 +303,7 @@ export async function execNotePaginationQuery(
|
||||||
noteId?: string;
|
noteId?: string;
|
||||||
},
|
},
|
||||||
filter?: (_: ScyllaNote[]) => Promise<ScyllaNote[]>,
|
filter?: (_: ScyllaNote[]) => Promise<ScyllaNote[]>,
|
||||||
maxDays = 30,
|
maxPartitions = 30,
|
||||||
): Promise<ScyllaNote[]> {
|
): Promise<ScyllaNote[]> {
|
||||||
if (!scyllaClient) return [];
|
if (!scyllaClient) return [];
|
||||||
|
|
||||||
|
@ -312,8 +312,8 @@ export async function execNotePaginationQuery(
|
||||||
let scannedPartitions = 0;
|
let scannedPartitions = 0;
|
||||||
const foundNotes: ScyllaNote[] = [];
|
const foundNotes: ScyllaNote[] = [];
|
||||||
|
|
||||||
// Try to get posts of at most <maxDays> in the single request
|
// Try to get posts of at most <maxPartitions> in the single request
|
||||||
while (foundNotes.length < ps.limit && scannedPartitions < maxDays) {
|
while (foundNotes.length < ps.limit && scannedPartitions < maxPartitions) {
|
||||||
const params: (Date | string | string[] | number)[] = [];
|
const params: (Date | string | string[] | number)[] = [];
|
||||||
if (ps.noteId) {
|
if (ps.noteId) {
|
||||||
params.push(ps.noteId, untilDate);
|
params.push(ps.noteId, untilDate);
|
||||||
|
|
Loading…
Reference in a new issue