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 Value | Description |
---|---|
0 | In getVideoTags : the tags was successfully fetchedIn getVideosTags : all null-tags videos have a corresponding job successfully queued. |
1 | Used in getVideoTags : occured fetch error during the job |
2 | Used in getVideoTags : we've reached the rate limit set in NetScheduler |
3 | Used in getVideoTags : did't provide aid in the job data |
4 | Used ingetVideosTags : There's no video with NULL as `tags` |
1xx | Used 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. |