Merge branch 'gitbook'

This commit is contained in:
alikia2x (寒寒) 2025-02-12 02:24:25 +08:00
commit 33062a7693
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6
3 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,2 @@
# Message Queue

View File

@ -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:
<table><thead><tr><th width="168">Return Value</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>In <code>getVideoTags</code>: the tags was successfully fetched<br>In <code>getVideosTags</code>: all null-tags videos have a corresponding job successfully queued.</td></tr><tr><td>1</td><td>Used in <code>getVideoTags</code>: occured <code>fetch</code>error during the job</td></tr><tr><td>2</td><td>Used in <code>getVideoTags</code>: we've reached the rate limit set in NetScheduler</td></tr><tr><td>3</td><td>Used in <code>getVideoTags</code>: did't provide aid in the job data</td></tr><tr><td>4</td><td>Used in<code>getVideosTags</code>: There's no video with NULL as `tags`</td></tr><tr><td>1xx</td><td>Used in<code>getVideosTags</code>: the number of tasks in the queue has exceeded the limit, thus <code>getVideosTags</code> stops adding tasks. <code>xx</code> is the number of jobs added to the queue during execution.</td></tr></tbody></table>