examples: fetch 30 stories instead of 10 in examples/news_fetcher.v

This commit is contained in:
Delyan Angelov 2025-03-25 09:12:52 +02:00
parent 287e9a8fa8
commit 86402934d3
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED

View file

@ -21,7 +21,7 @@ fn worker_fetch(mut p pool.PoolProcessor, cursor int, worker_id int) voidptr {
// println(resp.body) // println(resp.body)
return pool.no_result return pool.no_result
} }
println('# ${cursor}) ${story.title} | ${story.url}') println('# ${cursor + 1}) ${story.title} | ${story.url}')
return pool.no_result return pool.no_result
} }
@ -38,7 +38,7 @@ fn main() {
return return
}#[0..10] }#[0..10]
*/ */
ids := resp.body.replace_once('[', '').replace_once(']', '').split(',').map(it.int())#[0..10] ids := resp.body.replace_once('[', '').replace_once(']', '').split(',').map(it.int())#[0..30]
mut fetcher_pool := pool.new_pool_processor( mut fetcher_pool := pool.new_pool_processor(
callback: worker_fetch callback: worker_fetch
) )