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
cc96c195
Commit
cc96c195
authored
May 18, 2017
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
cfecf12f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
scheduler.js
coreservice/scheduler.js
+0
-1
cronlist.js
lib/mems/cronlist.js
+5
-3
No files found.
coreservice/scheduler.js
View file @
cc96c195
...
...
@@ -41,7 +41,6 @@ SchedulerService.prototype.reload = function ()
self
.
clean
();
self
.
crons
.
update
(
function
(
err
){
var
cl
=
self
.
crons
.
list
;
console
.
log
(
cl
);
for
(
var
i
=
0
;
i
<
cl
.
length
;
i
++
)
{
var
c
=
cl
[
i
];
...
...
lib/mems/cronlist.js
View file @
cc96c195
...
...
@@ -7,7 +7,8 @@ module.exports.create = function(cfg)
return
new
CronList
(
cfg
);
}
module
.
exports
.
mkCron
=
function
(
name
,
cmd
,
jobid
,
opt
)
module
.
exports
.
mkCron
=
mkCron
;
function
mkCron
(
name
,
cmd
,
jobid
,
opt
)
{
var
a
=
{
'name'
:
name
,
...
...
@@ -63,7 +64,8 @@ CronList.prototype.update = function(cb)
// });
self
.
list
=
[];
self
.
mem
.
hgetall
(
KEYS
,
function
(
err
,
res
){
if
(
!
err
&&
Array
.
isArray
(
res
)){
if
(
!
err
&&
res
){
var
ks
=
Object
.
keys
(
res
);
for
(
var
i
=
0
;
i
<
ks
.
length
;
i
++
)
{
...
...
@@ -71,7 +73,7 @@ CronList.prototype.update = function(cb)
var
trigger
=
JSON
.
parse
(
res
[
k
]);
if
(
trigger
.
type
==
'cron'
)
{
var
cl
=
self
.
mkCron
(
trigger
.
id
,
trigger
.
cmd
,
trigger
.
job_id
);
var
cl
=
mkCron
(
trigger
.
id
,
trigger
.
cmd
,
trigger
.
job_id
);
self
.
list
.
push
(
cl
);
}
}
...
...
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