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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
28208221
Commit
28208221
authored
1 year ago
by
Gilles Filippini
Browse files
Options
Downloads
Patches
Plain Diff
fix(1398): make sync with --onlypeers work again
parent
7a51be31
No related branches found
No related tags found
1 merge request
!1439
fix(1398): make sync with --onlypeers work again
Pipeline
#33322
passed
1 year ago
Stage: tests
Stage: package
Stage: integration
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/modules/crawler/lib/sync/RemoteSynchronizer.ts
+6
-3
6 additions, 3 deletions
app/modules/crawler/lib/sync/RemoteSynchronizer.ts
with
6 additions
and
3 deletions
app/modules/crawler/lib/sync/RemoteSynchronizer.ts
+
6
−
3
View file @
28208221
...
@@ -375,16 +375,19 @@ export class RemoteSynchronizer extends AbstractSynchronizer {
...
@@ -375,16 +375,19 @@ export class RemoteSynchronizer extends AbstractSynchronizer {
}
}
async
syncPeers
(
fullSync
:
boolean
,
to
?:
number
):
Promise
<
void
>
{
async
syncPeers
(
fullSync
:
boolean
,
to
?:
number
):
Promise
<
void
>
{
if
(
!
this
.
node
)
{
await
this
.
init
();
}
const
peers
=
await
this
.
node
.
getPeers
();
const
peers
=
await
this
.
node
.
getPeers
();
for
(
let
i
=
0
;
i
<
peers
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
peers
.
length
;
i
++
)
{
const
peer
=
PeerDTO
.
fromJSONObject
(
peers
[
i
]);
const
peer
=
PeerDTO
.
fromJSONObject
(
peers
[
i
]);
this
.
watcher
.
writeStatus
(
"
Peer
"
+
peer
.
pubkey
);
//
this.watcher.writeStatus("Peer " + peer.pubkey);
this
.
watcher
.
peersPercent
(
Math
.
ceil
((
i
/
peers
.
length
)
*
100
));
//
this.watcher.peersPercent(Math.ceil((i / peers.length) * 100));
try
{
try
{
await
this
.
PeeringService
.
submitP
(
DBPeer
.
fromPeerDTO
(
peer
));
await
this
.
PeeringService
.
submitP
(
DBPeer
.
fromPeerDTO
(
peer
));
}
catch
(
e
)
{}
}
catch
(
e
)
{}
}
}
this
.
watcher
.
peersPercent
(
100
);
//
this.watcher.peersPercent(100);
}
}
async
syncSandbox
():
Promise
<
void
>
{
async
syncSandbox
():
Promise
<
void
>
{
...
...
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