Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
da0a323e
Commit
da0a323e
authored
Feb 22, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c86f2da3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
go/neo/py/runneo.py
go/neo/py/runneo.py
+8
-3
No files found.
go/neo/py/runneo.py
View file @
da0a323e
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2020 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
# Copyright (C) 2020
-2021
Nexedi SA and Contributors.
#
Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
...
...
@@ -22,6 +22,8 @@
Usage: runneo.py <workdir> <cluster-name> [k1=v1] [k2=v2] ...
{k->v} dict is optional arguments for NEOCluster.
<workdir>/ready is created with address of master after spawned cluster becomes
operational.
"""
...
...
@@ -55,6 +57,7 @@ def main():
raise
SystemExit
(
sinfo
(
"terminated"
))
signal
(
SIGTERM
,
_
)
# SSL setup
flags
=
' !ssl'
ca
=
kw
.
pop
(
'ca'
,
None
)
cert
=
kw
.
pop
(
'cert'
,
None
)
...
...
@@ -66,6 +69,7 @@ def main():
flags
=
' ssl'
NEOCluster
.
SSL
=
(
ca
,
cert
,
key
)
# Start the cluster
cluster
=
NEOCluster
([
clusterName
],
adapter
=
'SQLite'
,
name
=
clusterName
,
temp_dir
=
workdir
,
**
kw
)
cluster
.
start
()
defer
(
cluster
.
stop
)
...
...
@@ -73,7 +77,7 @@ def main():
cluster
.
expectClusterRunning
()
info
(
"started master(s): %s"
%
(
cluster
.
master_nodes
,))
# dump information about ready cluster into readyf
ile
# dump information about ready cluster into readyf
with
open
(
"%s.tmp"
%
readyf
,
"w"
)
as
f
:
f
.
write
(
cluster
.
master_nodes
)
# XXX ' ' separated if multiple masters
os
.
rename
(
"%s.tmp"
%
readyf
,
readyf
)
# atomic
...
...
@@ -82,6 +86,7 @@ def main():
os
.
unlink
(
readyf
)
defer
(
_
)
# started ok -> serve
while
1
:
sleep
(
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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