Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from nebula3.Config import Config
|
2 |
from nebula3.gclient.net import ConnectionPool
|
3 |
from nebula3.mclient import MetaCache
|
4 |
from nebula3.gclient.net import Connection
|
5 |
from nebula3.graph import GraphService
|
6 |
-
|
7 |
-
os.system("""
|
8 |
-
nebula-metad --daemon
|
9 |
-
nebula-storaged --daemon
|
10 |
-
nebula-graphd --daemon
|
11 |
-
""")
|
12 |
# 接続設定
|
13 |
config = Config()
|
14 |
config.max_connection_pool_size = 10
|
|
|
1 |
+
import os
|
2 |
+
import time
|
3 |
+
import subprocess
|
4 |
+
|
5 |
+
# Nebula Graphサービスの起動
|
6 |
+
subprocess.call("nebula-metad --daemon", shell=True)
|
7 |
+
subprocess.call("nebula-storaged --daemon", shell=True)
|
8 |
+
subprocess.call("nebula-graphd --daemon", shell=True)
|
9 |
+
|
10 |
+
# サービスが起動するまでの遅延
|
11 |
+
time.sleep(10) # 10秒待機(必要に応じて調整)
|
12 |
+
|
13 |
from nebula3.Config import Config
|
14 |
from nebula3.gclient.net import ConnectionPool
|
15 |
from nebula3.mclient import MetaCache
|
16 |
from nebula3.gclient.net import Connection
|
17 |
from nebula3.graph import GraphService
|
18 |
+
|
|
|
|
|
|
|
|
|
|
|
19 |
# 接続設定
|
20 |
config = Config()
|
21 |
config.max_connection_pool_size = 10
|