完成解析模块示例. 数据库入库测试.

TODO: 调整程序启动停止(非暴力关闭).
This commit is contained in:
eson
2020-07-16 15:25:55 +08:00
parent 51fe6f6039
commit 7e3b36c7d0
7 changed files with 361 additions and 322 deletions

View File

@@ -25,7 +25,7 @@ CREATE TABLE IF NOT EXISTS `collect_log` (
`platform` varchar(255) NOT NULL,
`anchor_id` varchar(255) NOT NULL,
`is_showing` tinyint(1) DEFAULT 0,
`is_live_streaming` tinyint(1) DEFAULT 0,
`is_error` tinyint(1) DEFAULT 0,
`followers` bigint(11) DEFAULT NULL,
@@ -33,9 +33,9 @@ CREATE TABLE IF NOT EXISTS `collect_log` (
`giver` json DEFAULT NULL,
`gratuity` bigint(11) DEFAULT NULL,
`show_title` text DEFAULT NULL,
`show_start_time` timestamp NULL DEFAULT NULL,
`show_end_time` timestamp NULL DEFAULT NULL,
`live_title` text DEFAULT NULL,
`live_start_time` timestamp NULL DEFAULT NULL,
`live_end_time` timestamp NULL DEFAULT NULL,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`tags` json DEFAULT NULL,
`ext` json DEFAULT NULL,
@@ -45,7 +45,7 @@ CREATE TABLE IF NOT EXISTS `collect_log` (
KEY `uid_idx` (`uid`),
KEY `platform_idx` (`platform`),
KEY `anchor_id_idx` (`anchor_id`),
KEY `is_showing_idx` (`is_showing`),
KEY `is_live_streaming_idx` (`is_live_streaming`),
KEY `is_error_idx` (`is_error`),
KEY `followers_idx` (`followers`),
KEY `views_idx` (`views`),