2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-12-25 23:32:17 +08:00
asynq/internal
Pior Bastida 3dbda60333
Improve performance of enqueueing tasks (#946)
* Improve performance of enqueueing tasks

Add an in-memory cache to keep track of all the queues. Use this cache
to avoid sending an SADD since after the first call, that extra network
call isn't necessary.

The cache will expire every 10 secs so for cases where the queue is
deleted from asynq:queues set, it can be added again next time a task is
enqueued to it.

* Use sync.Map to simplify the conditional SADD

* Cleanup queuePublished in RemoveQueue

---------

Co-authored-by: Yousif <753751+yousifh@users.noreply.github.com>
2024-10-30 08:25:35 +03:00
..
base remove deprecated protobuf ptypes (#942) 2024-10-29 09:21:27 +03:00
context Fix comment typos 2022-05-16 21:14:15 -07:00
errors feat (add): panic error handling (#491) 2023-07-20 21:33:39 +08:00
log Change LogLevel to satisfy flag.Value interface 2020-05-16 08:00:35 -07:00
proto remove deprecated protobuf ptypes (#942) 2024-10-29 09:21:27 +03:00
rdb Improve performance of enqueueing tasks (#946) 2024-10-30 08:25:35 +03:00
testbroker feature: configurable janitor interval and deletion batch size (#715) 2024-05-06 14:11:52 +08:00
testutil fix unit test 2023-04-17 22:30:33 -07:00
timeutil Make timeutil.SimulatedClock concurrency safe 2022-02-19 06:15:44 -08:00