Skip to content

Commit

Permalink
style(blob-propagation-jobs-cli): improve log messages for create c…
Browse files Browse the repository at this point in the history
…ommand
  • Loading branch information
PJColombo committed Nov 27, 2024
1 parent 5d66827 commit 0285edc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions clis/blob-propagation-jobs-cli/src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ async function findNearestBlock({
slotOrDate?: string | number;
limit?: "lower" | "upper";
} = {}) {
console.log(`Finding nearest block for ${slotOrDate}…`);
console.log(
`Finding nearest ${limit} block${slotOrDate ? ` for ${slotOrDate}` : ""}…`
);
let block: BlockPayload | null = null;

const isLower = limit === "lower";
Expand Down Expand Up @@ -177,6 +179,7 @@ export const create: Command = async function (argv) {
const storageQueues = queueNames
? context.getQueuesOrThrow(queueNames)
: context.getAllStorageQueues();
const storageQueueNames = storageQueues.map((q) => q.name).join(", ");
let blobHashes: string[];

if (rawBlobHashes?.length) {
Expand All @@ -202,6 +205,8 @@ export const create: Command = async function (argv) {
);
}

console.log(`Creating jobs for storage queues: ${storageQueueNames}…`);

const jobs = await createBlobPropagationJobs(storageQueues, blobHashes);

console.log(`${jobs.length} jobs created`);
Expand Down Expand Up @@ -245,7 +250,7 @@ export const create: Command = async function (argv) {
}

console.log(
`Creating propagation jobs for blobs between blocks ${fromBlock} and ${toBlock}…`
`Creating propagation jobs for blobs between blocks ${fromBlock} and ${toBlock} for storage queues: ${storageQueueNames}…`
);

let batchFromBlock = fromBlock,
Expand Down

0 comments on commit 0285edc

Please sign in to comment.