Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
go-crontab
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f749294e
authored
Aug 14, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
0c0fb15f
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
35 additions
and
4 deletions
master/Config.go
master/JobMgr.go
master/WorkerMgr.go
master/main/master.json
master/main/master.json.bak
master/main/master.json.pro
worker/Config.go
worker/JobMgr.go
worker/Register.go
worker/main/worker.json.bak
worker/main/worker.json.pro
master/Config.go
View file @
f749294e
...
@@ -15,6 +15,8 @@ type Config struct {
...
@@ -15,6 +15,8 @@ type Config struct {
WebRoot
string
`json:"webroot"`
WebRoot
string
`json:"webroot"`
MongodbUri
string
`json:"mongodbUri"`
MongodbUri
string
`json:"mongodbUri"`
MongodbConnectTimeout
int
`json:"mongodbConnectTimeout"`
MongodbConnectTimeout
int
`json:"mongodbConnectTimeout"`
EtcdUserName
string
`json"etcdUserName"`
EtcdPasswd
string
`json"etcdPasswd"`
}
}
var
(
var
(
...
...
master/JobMgr.go
View file @
f749294e
...
@@ -45,6 +45,8 @@ func InitJobMgr() (err error) {
...
@@ -45,6 +45,8 @@ func InitJobMgr() (err error) {
config
=
clientv3
.
Config
{
config
=
clientv3
.
Config
{
Endpoints
:
G_config
.
EtcdEndpoints
,
// 集群地址
Endpoints
:
G_config
.
EtcdEndpoints
,
// 集群地址
DialTimeout
:
time
.
Duration
(
G_config
.
EtcdDialTimeout
)
*
time
.
Millisecond
,
// 连接超时
DialTimeout
:
time
.
Duration
(
G_config
.
EtcdDialTimeout
)
*
time
.
Millisecond
,
// 连接超时
Username
:
G_config
.
EtcdUserName
,
Password
:
G_config
.
EtcdPasswd
,
}
}
// 建立连接
// 建立连接
...
...
master/WorkerMgr.go
View file @
f749294e
...
@@ -56,6 +56,8 @@ func InitWorkerMgr() (err error) {
...
@@ -56,6 +56,8 @@ func InitWorkerMgr() (err error) {
config
=
clientv3
.
Config
{
config
=
clientv3
.
Config
{
Endpoints
:
G_config
.
EtcdEndpoints
,
// 集群地址
Endpoints
:
G_config
.
EtcdEndpoints
,
// 集群地址
DialTimeout
:
time
.
Duration
(
G_config
.
EtcdDialTimeout
)
*
time
.
Millisecond
,
// 连接超时
DialTimeout
:
time
.
Duration
(
G_config
.
EtcdDialTimeout
)
*
time
.
Millisecond
,
// 连接超时
Username
:
G_config
.
EtcdUserName
,
Password
:
G_config
.
EtcdPasswd
,
}
}
// 建立连接
// 建立连接
...
...
master/main/master.json
View file @
f749294e
...
@@ -21,5 +21,8 @@
...
@@ -21,5 +21,8 @@
"mongodbUri"
:
"mongodb://ichunt:huntmon6699@192.168.1.237:27017/ichunt?authMechanism=SCRAM-SHA-1"
,
"mongodbUri"
:
"mongodb://ichunt:huntmon6699@192.168.1.237:27017/ichunt?authMechanism=SCRAM-SHA-1"
,
"mongodb连接超时时间"
:
"单位毫秒"
,
"mongodb连接超时时间"
:
"单位毫秒"
,
"mongodbConnectTimeout"
:
5000
"mongodbConnectTimeout"
:
5000
,
"etcdUserName"
:
"root"
,
"etcdPasswd"
:
"huntmon66499"
}
}
\ No newline at end of file
master/main/master.json.bak
View file @
f749294e
...
@@ -21,5 +21,7 @@
...
@@ -21,5 +21,7 @@
"mongodbUri": "mongodb://ichunt:huntmon6699@192.168.1.237:27017/ichunt?authMechanism=SCRAM-SHA-1",
"mongodbUri": "mongodb://ichunt:huntmon6699@192.168.1.237:27017/ichunt?authMechanism=SCRAM-SHA-1",
"mongodb连接超时时间": "单位毫秒",
"mongodb连接超时时间": "单位毫秒",
"mongodbConnectTimeout": 5000
"mongodbConnectTimeout": 5000,
"etcdUserName":"",
"etcdPasswd":""
}
}
\ No newline at end of file
master/main/master.json.pro
View file @
f749294e
...
@@ -21,5 +21,8 @@
...
@@ -21,5 +21,8 @@
"mongodbUri"
:
"mongodb://ichunt:huntmon66499@172.18.137.23:27017/ichunt?authMechanism=SCRAM-SHA-1"
,
"mongodbUri"
:
"mongodb://ichunt:huntmon66499@172.18.137.23:27017/ichunt?authMechanism=SCRAM-SHA-1"
,
"mongodb连接超时时间"
:
"单位毫秒"
,
"mongodb连接超时时间"
:
"单位毫秒"
,
"mongodbConnectTimeout"
:
5000
"mongodbConnectTimeout"
:
5000
,
"etcdUserName"
:
"root"
,
"etcdPasswd"
:
"huntmon66499"
}
}
\ No newline at end of file
worker/Config.go
View file @
f749294e
...
@@ -14,6 +14,8 @@ type Config struct {
...
@@ -14,6 +14,8 @@ type Config struct {
JobLogBatchSize
int
`json:"jobLogBatchSize"`
JobLogBatchSize
int
`json:"jobLogBatchSize"`
JobLogCommitTimeout
int
`json"jobLogCommitTimeout"`
JobLogCommitTimeout
int
`json"jobLogCommitTimeout"`
ExecCommand
string
`json"execCommand"`
ExecCommand
string
`json"execCommand"`
EtcdUserName
string
`json"etcdUserName"`
EtcdPasswd
string
`json"etcdPasswd"`
}
}
var
(
var
(
...
...
worker/JobMgr.go
View file @
f749294e
...
@@ -212,6 +212,8 @@ func InitJobMgr() (err error) {
...
@@ -212,6 +212,8 @@ func InitJobMgr() (err error) {
config
=
clientv3
.
Config
{
config
=
clientv3
.
Config
{
Endpoints
:
G_config
.
EtcdEndpoints
,
// 集群地址
Endpoints
:
G_config
.
EtcdEndpoints
,
// 集群地址
DialTimeout
:
time
.
Duration
(
G_config
.
EtcdDialTimeout
)
*
time
.
Millisecond
,
// 连接超时
DialTimeout
:
time
.
Duration
(
G_config
.
EtcdDialTimeout
)
*
time
.
Millisecond
,
// 连接超时
Username
:
G_config
.
EtcdUserName
,
Password
:
G_config
.
EtcdPasswd
,
}
}
// 建立连接
// 建立连接
...
...
worker/Register.go
View file @
f749294e
...
@@ -119,6 +119,8 @@ func InitRegister() (err error) {
...
@@ -119,6 +119,8 @@ func InitRegister() (err error) {
config
=
clientv3
.
Config
{
config
=
clientv3
.
Config
{
Endpoints
:
G_config
.
EtcdEndpoints
,
// 集群地址
Endpoints
:
G_config
.
EtcdEndpoints
,
// 集群地址
DialTimeout
:
time
.
Duration
(
G_config
.
EtcdDialTimeout
)
*
time
.
Millisecond
,
// 连接超时
DialTimeout
:
time
.
Duration
(
G_config
.
EtcdDialTimeout
)
*
time
.
Millisecond
,
// 连接超时
Username
:
G_config
.
EtcdUserName
,
Password
:
G_config
.
EtcdPasswd
,
}
}
// 建立连接
// 建立连接
...
...
worker/main/worker.json.bak
View file @
f749294e
...
@@ -17,5 +17,8 @@
...
@@ -17,5 +17,8 @@
"日志自动提交超时": "在批次未达到阀值之前, 超时会自动提交batch",
"日志自动提交超时": "在批次未达到阀值之前, 超时会自动提交batch",
"jobLogCommitTimeout": 1000,
"jobLogCommitTimeout": 1000,
"etcdUserName":"root",
"etcdPasswd":"huntmon66499",
"execCommand": "C:\\\\cygwin64\\\\bin\\\\bash.exe"
"execCommand": "C:\\\\cygwin64\\\\bin\\\\bash.exe"
}
}
\ No newline at end of file
worker/main/worker.json.pro
View file @
f749294e
...
@@ -17,5 +17,8 @@
...
@@ -17,5 +17,8 @@
"日志自动提交超时"
:
"在批次未达到阀值之前, 超时会自动提交batch"
,
"日志自动提交超时"
:
"在批次未达到阀值之前, 超时会自动提交batch"
,
"jobLogCommitTimeout"
:
1000
,
"jobLogCommitTimeout"
:
1000
,
"execCommand"
:
"/bin/bash"
"execCommand"
:
"/bin/bash"
,
"etcdUserName"
:
"root"
,
"etcdPasswd"
:
"huntmon66499"
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment