1. After a video upload fails, the channel application task status occasionally shows [4: Under Review (Platform)] instead of [3: Failed (Channel Publish)]. Checking the publish log table, 1 Douyin content item was sent to 5 Douyin accounts at the same time. Video uploads failed for 3 of these accounts. The channel application task IDs are: 159, 162, and 163. See Figure 1.
![After a video upload fails, the channel application task status occasionally shows [4: Under Review (Platform)] instead of [3: Failed (Channel Publish)]. Checking the publish log table, 1 Douyin content item was sent to 5 Douyin accounts at the same time. Video uploads failed for 3 of these accounts. The channel application task IDs are: 159, 162, and 163.](https://media.shuijingwanwq.com/2021/07/1-8.png)
2. Checking the channel application task table for the 3 records corresponding to channel application task IDs 159, 162, and 163, the expected status is [3: Failed (Channel Publish)]. However, the 3 records corresponding to channel application task IDs 162 and 163 have the status [4: Under Review (Platform)]. See Figure 2.
![Checking the channel application task table for the 3 records corresponding to channel application task IDs 159, 162, and 163, the expected status is [3: Failed (Channel Publish)]. However, the 3 records corresponding to channel application task IDs 162 and 163 have the status [4: Under Review (Platform)].](https://media.shuijingwanwq.com/2021/07/2-8.png)
3. Upon closely reviewing the code implementation, after a video upload fails, the channel application task status is updated to [3: Failed (Channel Publish)]. A record is then inserted into the publish log table, and the entire publish process concludes.
4. Finally, I decided to analyze the other channel application task IDs 160 and 161 under task ID 40. After the video upload for channel application task ID 160 succeeds, the create video operation is executed. Surprisingly, during this operation, when updating the status to 4, it updates based on the task ID rather than the channel application task ID. See Figure 3.

5. The timeline of this Bug’s occurrence can be deduced as follows: After the video upload for channel application task ID 159 fails, its status is updated to [3: Failed (Channel Publish)]. After the video creation for channel application task ID 160 succeeds, the channel application task table statuses are batch-updated to [4: Under Review (Platform)] based on task ID 40. Then, when the video uploads for channel application task IDs 162 and 163 fail, their attempts to update the status to [3: Failed (Channel Publish)] fail, because the update condition requires the status to be [Publishing (Channel Publish)].
6. Checking the timestamp for the failed video upload of channel application task ID 159: 2021-07-15 11:35:11, which is earlier than the timestamp for the successful video creation of channel application task ID 160. See Figure 4.

7. Checking the timestamps for the failed video uploads of channel application task IDs 162 and 163: 2021-07-15 11:35:38 and 2021-07-15 11:35:48, which are later than the timestamp for the successful video creation of channel application task ID 160. See Figure 5.

8. The timestamp for the successful video upload of channel application task ID 160 is 2021-07-15 11:34:57. There is no record of the timestamp for the successful video creation of channel application task ID 160, but it is definitely later than 2021-07-15 11:34:57. I plan to add the field item_created_at to the table cpa_douyin_video in the future. Comment: The creation time of the video content. See Figure 6.

