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
a59f3f23
authored
May 14, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
9f8efc75
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
master/JobMgr.go
master/JobMgr.go
View file @
a59f3f23
...
@@ -90,8 +90,8 @@ func (jobMgr *JobMgr) SaveJob(req *http.Request) (oldJob *common.Job, err error)
...
@@ -90,8 +90,8 @@ func (jobMgr *JobMgr) SaveJob(req *http.Request) (oldJob *common.Job, err error)
)
)
// 赋值给job
// 赋值给job
job
.
Name
=
req
.
FormValue
(
"job_name"
)
job
.
Name
=
req
.
FormValue
(
"job_
etcd_
name"
)
job
.
JobEtcdName
=
req
.
FormValue
(
"job_
etcd_
name"
)
job
.
JobEtcdName
=
req
.
FormValue
(
"job_name"
)
job
.
Command
=
req
.
FormValue
(
"command"
)
job
.
Command
=
req
.
FormValue
(
"command"
)
job
.
CronExpr
=
req
.
FormValue
(
"cron_expr"
)
job
.
CronExpr
=
req
.
FormValue
(
"cron_expr"
)
nodeIp
:=
req
.
FormValue
(
"node"
)
nodeIp
:=
req
.
FormValue
(
"node"
)
...
@@ -100,9 +100,9 @@ func (jobMgr *JobMgr) SaveJob(req *http.Request) (oldJob *common.Job, err error)
...
@@ -100,9 +100,9 @@ func (jobMgr *JobMgr) SaveJob(req *http.Request) (oldJob *common.Job, err error)
job_type
,
err
:=
strconv
.
ParseInt
(
req
.
FormValue
(
"job_type"
),
10
,
64
)
job_type
,
err
:=
strconv
.
ParseInt
(
req
.
FormValue
(
"job_type"
),
10
,
64
)
if
job_type
==
1
{
if
job_type
==
1
{
jobKey
=
common
.
JOB_SAVE_DIR
+
nodeIp
+
"/"
+
job
.
JobEtcd
Name
// etcd的保存key: 目录 + IP + 任务名称
jobKey
=
common
.
JOB_SAVE_DIR
+
nodeIp
+
"/"
+
job
.
Name
// etcd的保存key: 目录 + IP + 任务名称
}
else
{
}
else
{
jobKey
=
common
.
JOB_ONCE_SAVE_DIR
+
nodeIp
+
"/"
+
job
.
JobEtcd
Name
// etcd的保存key: 目录 + IP + 任务名称
jobKey
=
common
.
JOB_ONCE_SAVE_DIR
+
nodeIp
+
"/"
+
job
.
Name
// etcd的保存key: 目录 + IP + 任务名称
}
}
// 任务信息json
// 任务信息json
...
...
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