Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DZDTools
motherlode
Commits
97a844d1
Commit
97a844d1
authored
Mar 10, 2022
by
Tim Bleimehl
🤸🏼
Browse files
log pre and post commands
parent
63a9292c
Pipeline
#1542
passed with stage
in 23 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Motherlode/main.py
View file @
97a844d1
...
...
@@ -85,17 +85,18 @@ def parameter_validation():
def
main
():
parameter_validation
()
setup_logging
()
run_cypher
(
config
.
PRE_RUN_CYPHER_COMMANDS
)
run_cypher
(
config
.
PRE_RUN_CYPHER_COMMANDS
,
"Pre"
)
p
=
PipelineManager
()
if
config
.
RUN_BASELINE_LOADER
:
p
.
run_baseline
()
run_cypher
(
config
.
POST_RUN_CYPHER_COMMANDS
)
run_cypher
(
config
.
POST_RUN_CYPHER_COMMANDS
,
"Post"
)
if
config
.
RUN_SERVICE_LOADER
:
p
.
run_services
()
def
run_cypher
(
commands
:
List
[
str
]):
def
run_cypher
(
commands
:
List
[
str
]
,
mode
:
str
=
"Pre"
):
for
com
in
commands
:
log
.
info
(
f
"Run
{
mode
}
-command '
{
com
}
'"
)
py2neo
.
Graph
(
**
config
.
NEO4J
).
run
(
com
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment