forked from 58daojia-dba/mysqlbinlog_flashback
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constant.py
59 lines (53 loc) · 1.33 KB
/
constant.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
常量定义(正式环境)
v0.1.0 2016/07/20 yilai created
"""
from __future__ import print_function
class Constant(object):
"""
版本号标识
"""
VERSION="0.1.3"
"""
存一些全局的变量
:return:
"""
#保存数据的表名的模板
KEEP_DATA_TABLE_TEMPLATE=u"`_{0}_keep_data_`"
#定义程序日志的路径
LOGFILE_PATH="./"
#定义程序日志的文件名
LOGFILE_NAME="mysqlbinlog_flashback.log"
#输出文件的编码方式
FILE_ENCODING="utf-8"
#处理到数量后这个打印一条提示信息
PROCESS_INTERVAL=10000
#PROCESS_INTERVAL=100
#timedelta (minutes)of current time
TIMEDELTA_CURRENT_TIME=0
#是否对update语句生成update pk的字句
UPDATE_PK=True
#允许解析的字段类型,不在里面的会报错
ALLOW_TYPE={
"varchar":True,
"char":True,
"datetime":True,
"date":True,
"time":True,
"timestamp":True,
"bigint":True,
"mediumint":True,
"smallint":True,
"tinyint":True,
"int":True,
"smallint":True,
"decimal":True,
"float":True,
"double":True,
"longtext":True,
"tinytext":True,
"text":True,
"mediumtext":True
}