-
Notifications
You must be signed in to change notification settings - Fork 0
/
GtConfig.js
executable file
·52 lines (40 loc) · 1.25 KB
/
GtConfig.js
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
/**
* Created by Administrator on 2015/5/13.
*/
function getProperty(envKey, defaultValue) {
var value = process.env[envKey];
if (value == null) {
return defaultValue;
}
return value;
}
exports.isPushSingleBatchAsync = function (){
return getProperty("gexin_pushSingleBatch_needAsync", false);
};
exports.isPushListAsync = function () {
return getProperty("gexin_pushList_needAsync", false);
};
exports.isPushListNeedDetails = function() {
return getProperty("gexin_pushList_needDetails", false);
};
exports.getSyncListLimit = function () {
return getProperty("gexin_pushList_syncLimit", 1000);
};
exports.getAsyncListLimit = function () {
return getProperty("gexin_pushList_asyncLimit", 10000);
};
exports.getHttpConnectionTimeOut = function () {
return getProperty("gexin_http_connection_timeout", 60);
};
exports.getHttpSoTimeOut = function () {
return getProperty("gexin_http_so_timeout", 30000);
};
exports.getHttpTryCount = function () {
return getProperty("gexin_http_tryCount", 3);
};
exports.getHttpInspectInterval = function () {
return getProperty("gexin_inspect_interval", 30000);
};
exports.getSDKVersion = function() {
return "4.0.1.0";
};