| 307 |
ashish |
1 |
'''
|
|
|
2 |
Created on 28-Jun-2010
|
|
|
3 |
|
|
|
4 |
@author: ashish
|
|
|
5 |
'''
|
|
|
6 |
from shop2020.config.client.ConfigClient import ConfigClient
|
|
|
7 |
from shop2020.utils.Utils import log_entry
|
|
|
8 |
import shlex
|
|
|
9 |
import subprocess
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
local_port = "9005"
|
|
|
14 |
remote_host = "localhost"
|
|
|
15 |
remote_port = "9006"
|
|
|
16 |
category = "default"
|
|
|
17 |
|
|
|
18 |
try:
|
|
|
19 |
config_client = ConfigClient()
|
|
|
20 |
local_port = config_client.get_property("datalogging_service_local_port")
|
|
|
21 |
remote_host= config_client.get_property("datalogging_service_remote_hostname")
|
|
|
22 |
remote_port = config_client.get_property("datalogging_service_remote_port")
|
|
|
23 |
except:
|
|
|
24 |
log_entry("DataLoggerRemoteScribe", "could not read config server. Using local values")
|
|
|
25 |
|
|
|
26 |
args = "scribed -p %s -c %s" %(remote_port, "/tmp/scribe_central.conf")
|
|
|
27 |
|
|
|
28 |
args = shlex.split(args)
|
|
|
29 |
|
|
|
30 |
log_entry("DataLoggerRemoteScribe", args)
|
|
|
31 |
|
|
|
32 |
p = subprocess.Popen(args)
|