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
5921b520
Commit
5921b520
authored
May 19, 2017
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
817342bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
7 deletions
+32
-7
trigger-manager.js
coreservice/lib/trigger-manager.js
+2
-1
job-registry.js
lib/mems/job-registry.js
+13
-4
trigger-registry.js
lib/mems/trigger-registry.js
+17
-2
No files found.
coreservice/lib/trigger-manager.js
View file @
5921b520
...
...
@@ -33,5 +33,6 @@ TriggerManager.prototype.reload = function (prm,cb)
}
self
.
evp
.
send
(
topic
,
msg
);
cb
(
null
);
if
(
typeof
cb
==
'function'
){
cb
(
null
);}
}
lib/mems/job-registry.js
View file @
5921b520
...
...
@@ -39,11 +39,20 @@ JobRegistry.prototype.setJob = function(jobid,job,cb)
var
self
=
this
;
var
jobKey
=
PREFIX
+
':'
+
jobid
;
var
strjob
=
JSON
.
stringify
(
job
);
this
.
mem
.
set
(
jobKey
,
strjob
);
this
.
mem
.
set
(
jobKey
,
strjob
,
cb
);
if
(
typeof
cb
==
'function'
){
cb
();
}
// if(typeof cb == 'function'){
// cb();
// }
}
JobRegistry
.
prototype
.
deleteJob
=
function
(
jobid
,
cb
)
{
var
self
=
this
;
var
jobKey
=
PREFIX
+
':'
+
jobid
;
this
.
mem
.
del
(
jobKey
,
cb
);
}
...
...
lib/mems/trigger-registry.js
View file @
5921b520
...
...
@@ -19,17 +19,32 @@ var TR = function TriggerRegistry(cfg)
}
}
TR
.
prototype
.
setTrigger
=
function
(
name
,
trigger
,
cb
)
TR
.
prototype
.
setTrigger
=
function
(
id
,
trigger
,
cb
)
{
var
self
=
this
;
var
strTrigger
=
JSON
.
stringify
(
trigger
);
self
.
mem
.
hset
(
KEYS
,
name
,
strTrigger
);
self
.
mem
.
hset
(
KEYS
,
id
,
strTrigger
);
if
(
typeof
cb
==
'function'
){
cb
();
}
}
TR
.
prototype
.
deleteTrigger
=
function
(
id
,
cb
)
{
var
self
=
this
;
self
.
mem
.
hdel
(
KEYS
,
id
);
if
(
typeof
cb
==
'function'
){
cb
();
}
}
TR
.
prototype
.
deleteByJobId
=
function
(
jobid
,
cb
)
{
}
TR
.
prototype
.
setByJob
=
function
(
job
,
cb
)
{
var
self
=
this
;
...
...
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