Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
node-bigstream
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bs
node-bigstream
Commits
c302a817
Commit
c302a817
authored
May 20, 2017
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
5921b520
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
job-manager.js
coreservice/lib/job-manager.js
+11
-1
ws-jobs.js
coreservice/ws/v1/ws-jobs.js
+13
-1
trigger-registry.js
lib/mems/trigger-registry.js
+4
-1
No files found.
coreservice/lib/job-manager.js
View file @
c302a817
...
...
@@ -42,11 +42,21 @@ JobManager.prototype.getJob = function (prm,cb)
{
var
self
=
this
;
self
.
job_registry
.
getJob
(
prm
.
jid
,
function
(
err
,
jobcfg
){
self
.
job_registry
.
getJob
(
prm
.
j
ob_
id
,
function
(
err
,
jobcfg
){
cb
(
err
,
jobcfg
)
})
}
JobManager
.
prototype
.
deleteJob
=
function
(
prm
,
cb
)
{
var
self
=
this
;
var
job_id
=
prm
.
job_id
;
self
.
trigger_registry
.
deleteByJobId
(
job_id
,
function
(
err
){
self
.
job_registry
.
deleteJob
(
job_id
,
cb
);
});
}
JobManager
.
prototype
.
setJob
=
function
(
prm
,
cb
)
{
var
self
=
this
;
...
...
coreservice/ws/v1/ws-jobs.js
View file @
c302a817
...
...
@@ -24,7 +24,7 @@ router.get('/:jid',function (req, res) {
var
jid
=
req
.
params
.
jid
;
var
jm
=
req
.
context
.
jobManager
;
jm
.
getJob
({
'jid'
:
jid
},
function
(
err
,
jobs
){
jm
.
getJob
({
'j
ob_
id'
:
jid
},
function
(
err
,
jobs
){
if
(
jobs
)
{
respHelper
.
responseOK
(
jobs
);
...
...
@@ -34,6 +34,18 @@ router.get('/:jid',function (req, res) {
})
});
router
.
delete
(
'/:jid'
,
function
(
req
,
res
)
{
var
reqHelper
=
request
.
create
(
req
);
var
respHelper
=
response
.
create
(
res
);
var
jid
=
req
.
params
.
jid
;
var
jm
=
req
.
context
.
jobManager
;
jm
.
deleteJob
({
'job_id'
:
jid
},
function
(
err
){
respHelper
.
response200
();
});
});
router
.
post
(
'/'
,
function
(
req
,
res
)
{
var
reqHelper
=
request
.
create
(
req
);
var
respHelper
=
response
.
create
(
res
);
...
...
lib/mems/trigger-registry.js
View file @
c302a817
...
...
@@ -42,7 +42,10 @@ TR.prototype.deleteTrigger = function (id,cb)
TR
.
prototype
.
deleteByJobId
=
function
(
jobid
,
cb
)
{
var
self
=
this
;
var
id
=
'def.'
+
jobid
;
self
.
deleteTrigger
(
id
,
cb
);
}
TR
.
prototype
.
setByJob
=
function
(
job
,
cb
)
...
...
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