From e27be0a4d917bf2b9d0b25f4b01272aff1bf9503 Mon Sep 17 00:00:00 2001 From: alikia2x Date: Tue, 11 Feb 2025 16:07:25 +0000 Subject: [PATCH] doc: GitBook - No subject --- doc/en/SUMMARY.md | 2 ++ doc/en/architecure/message-queue/README.md | 2 ++ doc/en/architecure/message-queue/videotagsqueue.md | 11 +++++++++++ 3 files changed, 15 insertions(+) create mode 100644 doc/en/architecure/message-queue/README.md create mode 100644 doc/en/architecure/message-queue/videotagsqueue.md diff --git a/doc/en/SUMMARY.md b/doc/en/SUMMARY.md index e40326e..5137229 100644 --- a/doc/en/SUMMARY.md +++ b/doc/en/SUMMARY.md @@ -12,6 +12,8 @@ * [Overview](architecure/overview.md) * [Database Structure](architecure/database-structure/README.md) * [Type of Song](architecure/database-structure/type-of-song.md) +* [Message Queue](architecure/message-queue/README.md) + * [VideoTagsQueue](architecure/message-queue/videotagsqueue.md) * [Artificial Intelligence](architecure/artificial-intelligence.md) ## API Doc diff --git a/doc/en/architecure/message-queue/README.md b/doc/en/architecure/message-queue/README.md new file mode 100644 index 0000000..d0a8349 --- /dev/null +++ b/doc/en/architecure/message-queue/README.md @@ -0,0 +1,2 @@ +# Message Queue + diff --git a/doc/en/architecure/message-queue/videotagsqueue.md b/doc/en/architecure/message-queue/videotagsqueue.md new file mode 100644 index 0000000..bdddddb --- /dev/null +++ b/doc/en/architecure/message-queue/videotagsqueue.md @@ -0,0 +1,11 @@ +# VideoTagsQueue + +### Jobs + +The VideoTagsQueue contains two jobs: `getVideoTags`and `getVideosTags`. The former is used to fetch the tags of a video, and the latter is responsible for scheduling the former. + +### Return value + +The return values across two jobs follows the following table: + +
Return ValueDescription
0In getVideoTags: the tags was successfully fetched
In getVideosTags: all null-tags videos have a corresponding job successfully queued.
1Used in getVideoTags: occured fetcherror during the job
2Used in getVideoTags: we've reached the rate limit set in NetScheduler
3Used in getVideoTags: did't provide aid in the job data
4Used ingetVideosTags: There's no video with NULL as `tags`
1xxUsed ingetVideosTags: the number of tasks in the queue has exceeded the limit, thus getVideosTags stops adding tasks. xx is the number of jobs added to the queue during execution.