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
d32c9829
Commit
d32c9829
authored
Apr 04, 2017
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
afa3f33e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
+27
-27
test.js
test/test.js
+27
-27
No files found.
test/test.js
View file @
d32c9829
...
@@ -186,30 +186,30 @@ var ag = {
...
@@ -186,30 +186,30 @@ var ag = {
}
}
//
var JobTask = ctx.getLib('jobexecutor/lib/jobtask');
var
JobTask
=
ctx
.
getLib
(
'jobexecutor/lib/jobtask'
);
//
//
var job = new JobTask({
var
job
=
new
JobTask
({
//
'handle' : handle,
'handle'
:
handle
,
//
'job_config' : job_config,
'job_config'
:
job_config
,
//
'input_data' : input_data
'input_data'
:
input_data
//
});
});
//
job.run();
job
.
run
();
async
.
reduce
([
1
,
2
,
3
],
0
,
function
(
memo
,
item
,
callback
)
{
//
async.reduce([1,2,3], 0, function(memo, item, callback) {
// pointless async:
//
// pointless async:
process
.
nextTick
(
function
()
{
//
process.nextTick(function() {
console
.
log
(
item
);
//
console.log(item);
if
(
item
==
8
){
//
if(item==8){
callback
(
'err'
)
//
callback('err')
}
else
{
//
}else{
callback
(
null
,
item
)
//
callback(null,item)
}
//
}
});
//
});
},
function
(
err
,
result
)
{
//
}, function(err, result) {
// result is now equal to the last value of memo, which is 6
//
if
(
err
){
//
if(err){
console
.
log
(
err
);
//
console.log(err);
}
else
{
//
}else{
console
.
log
(
result
);
//
console.log(result);
}
//
}
});
//
});
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