Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
helperjs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Team
helperjs
Commits
c09be260
There was a problem fetching the pipeline summary.
Commit
c09be260
authored
8 years ago
by
clemo
Browse files
Options
Downloads
Patches
Plain Diff
collectLive with each trigger
Signed-off-by:
clemo
<
clemo@cbcode.at
>
parent
138e1077
Branches
master
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/ssb-cache/index.js
+4
-2
4 additions, 2 deletions
lib/ssb-cache/index.js
with
4 additions
and
2 deletions
lib/ssb-cache/index.js
+
4
−
2
View file @
c09be260
...
...
@@ -106,7 +106,7 @@ export class ssbCache extends Ssb {
* @param {function} cb - `(err) => {...}`
* @return {object} liveFeed - `liveFeed.stop();` //will trigger cb
**/
collectLive
(
cb
){
collectLive
(
cb
,
each
){
// let _on = {'msg':[]}
let
_stop
=
false
;
this
.
syncLastNode
((
err
)
=>
{
...
...
@@ -120,7 +120,9 @@ export class ssbCache extends Ssb {
if
(
_stop
){
args
[
1
](
true
);
//next(true) = end of stream
}
else
{
//trigger!
if
(
typeof
each
===
'
undefined
'
){
each
(...
args
);
}
this
.
addMsg
(...
args
);
}
},(
err
,...
args
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment