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
d71bcf76
Commit
d71bcf76
authored
6 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
[enh] faster sync: disable changes API while syncing
parent
45b95588
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/lib/common-libs/programOptions.ts
+2
-0
2 additions, 0 deletions
app/lib/common-libs/programOptions.ts
app/lib/dal/indexDAL/loki/LokiCollectionManager.ts
+2
-1
2 additions, 1 deletion
app/lib/dal/indexDAL/loki/LokiCollectionManager.ts
with
4 additions
and
1 deletion
app/lib/common-libs/programOptions.ts
+
2
−
0
View file @
d71bcf76
...
@@ -20,6 +20,7 @@ export interface ProgramOptions {
...
@@ -20,6 +20,7 @@ export interface ProgramOptions {
nosbx
?:
boolean
nosbx
?:
boolean
nopeers
?:
boolean
nopeers
?:
boolean
syncTrace
?:
string
syncTrace
?:
string
isSync
:
boolean
}
}
export
const
cliprogram
:
ProgramOptions
=
{
export
const
cliprogram
:
ProgramOptions
=
{
...
@@ -29,4 +30,5 @@ export const cliprogram: ProgramOptions = {
...
@@ -29,4 +30,5 @@ export const cliprogram: ProgramOptions = {
nosbx
:
opts
.
nosbx
,
nosbx
:
opts
.
nosbx
,
nopeers
:
opts
.
nopeers
,
nopeers
:
opts
.
nopeers
,
syncTrace
:
opts
[
'
sync-trace
'
],
syncTrace
:
opts
[
'
sync-trace
'
],
isSync
:
opts
.
_
[
0
]
===
'
sync
'
}
}
This diff is collapsed.
Click to expand it.
app/lib/dal/indexDAL/loki/LokiCollectionManager.ts
100644 → 100755
+
2
−
1
View file @
d71bcf76
import
{
LokiCollection
}
from
"
./LokiTypes
"
import
{
LokiCollection
}
from
"
./LokiTypes
"
import
{
LokiProxyCollection
}
from
"
./LokiCollection
"
import
{
LokiProxyCollection
}
from
"
./LokiCollection
"
import
{
NewLogger
}
from
"
../../../logger
"
import
{
NewLogger
}
from
"
../../../logger
"
import
{
cliprogram
}
from
"
../../../common-libs/programOptions
"
const
logger
=
NewLogger
()
const
logger
=
NewLogger
()
...
@@ -20,7 +21,7 @@ export abstract class LokiCollectionManager<T> {
...
@@ -20,7 +21,7 @@ export abstract class LokiCollectionManager<T> {
public
triggerInit
()
{
public
triggerInit
()
{
const
coll
=
this
.
loki
.
addCollection
(
this
.
collectionName
,
{
const
coll
=
this
.
loki
.
addCollection
(
this
.
collectionName
,
{
indices
:
this
.
indices
,
indices
:
this
.
indices
,
disableChangesApi
:
false
disableChangesApi
:
cliprogram
.
isSync
})
})
this
.
collection
=
new
LokiProxyCollection
(
coll
,
this
.
collectionName
)
this
.
collection
=
new
LokiProxyCollection
(
coll
,
this
.
collectionName
)
this
.
resolveCollection
()
this
.
resolveCollection
()
...
...
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