Add video download failure reporting feature
- Introduced a new API endpoint `POST /api/v1/video/remove_watermark/report_failure` for reporting download failures. - Added a new database table `video_download_failures` to store details about failed downloads, including domain, URL, error message, and reporting metadata. - Updated the video handler to process failure reports and save them to the database. - Enhanced documentation to include details about the new reporting feature and its usage.
This commit is contained in:
@@ -31,3 +31,19 @@ CREATE TABLE IF NOT EXISTS `video_parse_unlocks` (
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uniq_video_unlock_date` (`mini_program_id`,`user_id`,`unlock_date`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- 下载失败上报
|
||||
CREATE TABLE IF NOT EXISTS `video_download_failures` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`deleted_at` datetime DEFAULT NULL,
|
||||
`domain` varchar(255) DEFAULT NULL,
|
||||
`failed_url` varchar(1000) NOT NULL,
|
||||
`error_message` text,
|
||||
`reported_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`user_agent` varchar(255) DEFAULT NULL,
|
||||
`client_ip` varchar(64) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_video_download_domain` (`domain`,`reported_at`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
Reference in New Issue
Block a user