mirror of
https://github.com/aljazceru/blastr.git
synced 2025-12-18 22:44:22 +01:00
Re-enable all queues and consume bigger batches
This commit is contained in:
28
src/lib.rs
28
src/lib.rs
@@ -79,13 +79,13 @@ pub async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
|
||||
ctx.env.queue(NOSTR_QUEUE).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_2).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_3).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_4).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_5).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_6).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_7).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_8).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_9).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_10).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_4).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_5).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_6).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_7).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_8).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_9).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_10).expect("get queue"),
|
||||
];
|
||||
try_queue_event(*event.clone(), nostr_queues).await;
|
||||
console_log!("queued up nostr event: {}", event.id);
|
||||
@@ -192,13 +192,13 @@ pub async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
|
||||
ctx.env.queue(NOSTR_QUEUE).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_2).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_3).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_4).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_5).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_6).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_7).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_8).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_9).expect("get queue"),
|
||||
//ctx.env.queue(NOSTR_QUEUE_10).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_4).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_5).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_6).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_7).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_8).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_9).expect("get queue"),
|
||||
ctx.env.queue(NOSTR_QUEUE_10).expect("get queue"),
|
||||
];
|
||||
try_queue_event(*event.clone(), nostr_queues).await;
|
||||
console_log!("queued up nostr event: {}", event.id);
|
||||
|
||||
@@ -58,52 +58,52 @@ WORKERS_RS_VERSION = "0.0.13"
|
||||
# consumers
|
||||
[[queues.consumers]]
|
||||
queue = "nostr-events-pub-1-b"
|
||||
max_batch_size = 20
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 5 # this is the best one, run quicker
|
||||
|
||||
[[queues.consumers]]
|
||||
queue = "nostr-events-pub-2-b"
|
||||
max_batch_size = 20
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 15
|
||||
|
||||
[[queues.consumers]]
|
||||
queue = "nostr-events-pub-3-b"
|
||||
max_batch_size = 20
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 15
|
||||
|
||||
[[queues.consumers]]
|
||||
queue = "nostr-events-pub-4-b"
|
||||
max_batch_size = 20
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 15
|
||||
|
||||
[[queues.consumers]]
|
||||
queue = "nostr-events-pub-5-b"
|
||||
max_batch_size = 20
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 15
|
||||
|
||||
[[queues.consumers]]
|
||||
queue = "nostr-events-pub-6-b"
|
||||
max_batch_size = 20
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 15
|
||||
|
||||
[[queues.consumers]]
|
||||
queue = "nostr-events-pub-7-b"
|
||||
max_batch_size = 20
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 15
|
||||
|
||||
[[queues.consumers]]
|
||||
queue = "nostr-events-pub-8-b"
|
||||
max_batch_size = 20
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 15
|
||||
|
||||
[[queues.consumers]]
|
||||
queue = "nostr-events-pub-9-b"
|
||||
max_batch_size = 20
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 15
|
||||
|
||||
[[queues.consumers]]
|
||||
queue = "nostr-events-pub-10-b"
|
||||
max_batch_size = 20
|
||||
max_batch_size = 100
|
||||
max_batch_timeout = 15
|
||||
|
||||
[build]
|
||||
|
||||
Reference in New Issue
Block a user