Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pascal Engélibert
duniter
Commits
eae94e0f
The default branch for this project has been changed. Please update your bookmarks.
Commit
eae94e0f
authored
7 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
[fix] sync: let Duniter exit if an error occur during blocks retrieval
parent
2bb8f811
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/modules/crawler/lib/sync.ts
+5
-2
5 additions, 2 deletions
app/modules/crawler/lib/sync.ts
with
5 additions
and
2 deletions
app/modules/crawler/lib/sync.ts
+
5
−
2
View file @
eae94e0f
...
...
@@ -143,7 +143,7 @@ export class Synchroniser extends stream.Duplex {
!
cautious
,
this
.
watcher
)
downloader
.
start
()
const
startp
=
downloader
.
start
()
let
lastPullBlock
:
BlockDTO
|
null
=
null
;
let
syncStrategy
=
this
.
syncStrategy
...
...
@@ -242,7 +242,10 @@ export class Synchroniser extends stream.Duplex {
})(
this
.
server
,
this
.
watcher
,
this
.
dal
,
this
.
BlockchainService
)
const
logInterval
=
setInterval
(()
=>
this
.
logRemaining
(
to
),
EVAL_REMAINING_INTERVAL
);
await
dao
.
pull
(
this
.
conf
,
this
.
logger
)
await
Promise
.
all
([
dao
.
pull
(
this
.
conf
,
this
.
logger
),
await
startp
// In case of errors, will stop the process
])
// Finished blocks
this
.
watcher
.
downloadPercent
(
100.0
);
...
...
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