From 27833e0dbe6a81f4f0154cadaf55197abf897b46 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 23 May 2024 21:30:41 +0300 Subject: [PATCH] examples: limit news_fetcher.v --- examples/news_fetcher.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/news_fetcher.v b/examples/news_fetcher.v index e2f0e5d416259a..c87f5a1c369153 100644 --- a/examples/news_fetcher.v +++ b/examples/news_fetcher.v @@ -18,6 +18,7 @@ fn worker_fetch(mut p pool.PoolProcessor, cursor int, worker_id int) voidptr { } story := json2.decode[Story](resp.body) or { println('failed to decode a story') + // println(resp.body) return pool.no_result } println('# ${cursor}) ${story.title} | ${story.url}') @@ -37,7 +38,7 @@ fn main() { return }#[0..10] */ - ids := resp.body.replace_once('[', '').replace_once(']', '').split(',').map(it.int()) + ids := resp.body.replace_once('[', '').replace_once(']', '').split(',').map(it.int())#[0..10] mut fetcher_pool := pool.new_pool_processor( callback: worker_fetch )