pip3 install -r requirements.txt
docker build -t saga-zombie .
已經加入 lock 防止多執行序同時寫入資料庫造成錯誤。預設每插入 10000 比資料會寫入硬碟一次。
如果指定的資料庫檔案不存在的話會新建一個,並自動創造好表格。
建議使用 with as 語句來確保離開時會自動寫入硬碟。
with SQLiteDBHandler('test.db') as db:
# do something here
post_id
(required)
- list of words
word
(ex. 科文哲)count
(ex. 10)
beginning_day
(optional, default1
)ending_day
(optional, default0
)
statastic
(list of pairs)word
(ex. 科文哲)count
(ex. 200)
beginning_day
(optional, default7
)ending_day
(optional, default0
)
- list of pair
username
(ex. aaab)count
(ex. 1600)
beginning_day
(optional, default7
)ending_day
(optional, default0
)
- list of pair
username
(ex. aaabb)count
(ex. 100)
-
username
(required) -
beginning_day
(optional, default7
) -
ending_day
(optional, default0
)
- list of pair
word
(ex. 科文哲)count
(ex. 200)
-
username
(required) -
beginning_day
(optional, default7
) -
ending_day
(optional, default0
)
- list of post info
board
post_id
date_time
title
web_url
ip
-
username
(required) -
beginning_day
(optional, default7
) -
ending_day
(optional, default0
)
- list of pushes info
board
post_id
type
content
ip
date_time
post_id
(required)
- list of pair
word
(ex. 科文哲)count
(ex. 200)
-
board
(required) -
post_id
(required)
board
author
date_time
title
web_url
ip
beginning_day
(optional, default7
)ending_day
(optional, default0
)
- list of pushes info
board
post_id
type
author
ip
date_time
beginning_day
(optional, default7
)ending_day
(optional, default0
)
days_ago
- list of user -> hour
{
"statistic" : {
"3" : {
"smallcar801" : 7,
"jason985" : 5,
"bqack" : 5,
"cca1109" : 7,
"aenneas" : 6,
"ThreekRoger" : 7
}
}
}