Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
duniter-currency-monit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Service Desk
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
Show more breadcrumbs
nodes
typescript
modules
duniter-currency-monit
Commits
e869df2f
Commit
e869df2f
authored
5 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
[enh] add `reindex` command
parent
08563465
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
index.js
+10
-1
10 additions, 1 deletion
index.js
with
10 additions
and
1 deletion
index.js
+
10
−
1
View file @
e869df2f
...
...
@@ -5,6 +5,7 @@ const fs = require('fs');
const
path
=
require
(
'
path
'
);
const
main
=
require
(
__dirname
+
'
/lib/main.js
'
);
const
indexing
=
require
(
__dirname
+
'
/lib/indexing.js
'
);
const
initMonitDB
=
require
(
'
./lib/DataFinder
'
).
initMonitDB
;
/****************************************
* TECHNICAL CONFIGURATION
...
...
@@ -52,7 +53,7 @@ module.exports = {
preventIfRunning
:
true
,
logs
:
false
,
onDatabaseExecute
:
(
server
,
conf
,
program
,
params
,
startServices
)
=>
co
(
function
*
()
{
// currency-monit parameters
const
ACTION
=
params
[
0
]
||
DEFAULT_ACTION
;
const
SERVER_HOST
=
params
[
1
]
||
DEFAULT_HOST
;
...
...
@@ -86,6 +87,14 @@ module.exports = {
return
server
&&
server
.
disconnect
()
}
})
},
{
name
:
'
reindex
'
,
desc
:
'
Reset indexed Monit data and rebuild index
'
,
preventIfRunning
:
true
,
logs
:
false
,
async
onDatabaseExecute
(
server
,
conf
,
program
,
params
,
startServices
)
{
await
initMonitDB
(
server
,
true
);
}
}]
},
duniterUI
:
{
...
...
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