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
34a8a0e3
Commit
34a8a0e3
authored
Mar 13, 2017
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
221e9b4e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
11 deletions
+30
-11
perform.js
plugins/do/do-bssfile/perform.js
+30
-11
No files found.
plugins/do/do-bssfile/perform.js
View file @
34a8a0e3
var
ctx
=
require
(
'../../../context'
);
var
fs
=
require
(
'fs'
);
var
BinStream
=
ctx
.
getLib
(
'lib/bss/binarystream_v1_1'
);
var
async
=
require
(
'async'
);
function
perform_function
(
context
,
request
,
response
){
var
job_id
=
context
.
jobconfig
.
job_id
;
...
...
@@ -44,7 +45,24 @@ function bss_write(fn,meta,data,response)
response
.
error
(
err
);
return
;
}
bss
.
write
(
data
,{
meta
:
meta
},
function
(
err
,
obj
){
var
arrData
=
[];
if
(
!
Array
.
isArray
(
data
)){
arrData
.
push
(
data
);
}
else
{
arrData
=
data
;
}
var
idx
=
0
;
async
.
whilst
(
function
()
{
return
idx
<
arrData
.
length
;
},
function
(
callback
)
{
bss
.
write
(
arrData
,{
meta
:
meta
},
function
(
err
,
obj
){
callback
(
err
);
});
},
function
(
err
)
{
if
(
!
err
){
bss
.
close
(
function
(
err
){
response
.
success
();
...
...
@@ -54,7 +72,8 @@ function bss_write(fn,meta,data,response)
response
.
error
(
"ERROR"
);
});
}
});
}
);
});
}
...
...
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