diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-09-26 13:58:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 13:58:57 +0800 |
commit | d0012c880604e54c563e033d125375c9335277f8 (patch) | |
tree | 2465e36682dee6ae92d97f0299aed4139cc64214 /modules/queue | |
parent | 3f82ca38af7cb671ec9e2f2dff5e0d6b062091ea (diff) | |
download | gitea-d0012c880604e54c563e033d125375c9335277f8.tar.gz gitea-d0012c880604e54c563e033d125375c9335277f8.zip |
Document the queue item's marshaling behavior (#27271)
Close #26843
Diffstat (limited to 'modules/queue')
-rw-r--r-- | modules/queue/queue.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/queue/queue.go b/modules/queue/queue.go index 1ad7320e31..577fd4d498 100644 --- a/modules/queue/queue.go +++ b/modules/queue/queue.go @@ -9,6 +9,8 @@ // - An item can be a simple value, such as an integer, or a more complex structure that has multiple fields. // Usually a item serves as a task or a message. Sets of items will be sent to a queue handler to be processed. // - It's represented as a JSON-marshaled binary slice in the queue +// - Since the item is marshaled by JSON, and JSON doesn't have stable key-order/type support, +// so the decoded handler item may not be the same as the original "pushed" one if you use map/any types, // // 2. Batch: // - A collection of items that are grouped together for processing. Each worker receives a batch of items. |