Skip to content

Commit

Permalink
Added missing paths and fixed bug in don corleone
Browse files Browse the repository at this point in the history
  • Loading branch information
kudkudak committed May 14, 2014
1 parent 11235d4 commit 118f63e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion don_corleone/don_corleone.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def _terminate_service(service_id):

cmd = "(cd {0} && {1})".format(
os.path.join(m[SERVICE_HOME],"don_corleone"),
"./scripts/{0}_terminate.sh".format(m[SERVICE]))
"./scripts/run.sh terminating_job ./scripts/{0}_terminate.sh".format(m[SERVICE]))

status, output = cautious_run_cmd_over_ssh(cmd, m[NODE_ID],m)

Expand Down
2 changes: 1 addition & 1 deletion scripts/ocean_init_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@
)

print 'Graph populated successfully.'
print 'NOTE: Remember to restart Lionfish ODM server.'
print 'NOTE: Remember to restart Lionfish ODM server.'
9 changes: 7 additions & 2 deletions scripts/ocean_small_exemplary_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@


if __name__ == '__main__':
# Create connection
graph_db = neo4j.GraphDatabaseService('http://ocean-lionfish.no-ip.biz:16/db/data/')
# Create connection
neo4j_port = None
neo4j_host = None
graph_db = neo4j.GraphDatabaseService(
'http://{0}:{1}/db/data/'.format(neo4j_host if neo4j_host else
get_configuration("neo4j","host"), neo4j_port if neo4j_port else get_configuration("neo4j", "port"))
)
# graph_db = neo4j.GraphDatabaseService('http://localhost:7474/db/data/')

print 'Running', __file__
Expand Down
12 changes: 10 additions & 2 deletions tests/spidercrab_1000_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import os
import threading
import time

import sys
sys.path.append(os.path.abspath(".."))
from don_corleone import don_utils as du

def run_master():
Expand All @@ -32,10 +33,17 @@ def run_slave():

if __name__ == '__main__':

#TODO: use os.path.join not + - it is bug prone
OCEAN_ROOT = du.get_ocean_root_dir()

DATA_FILE = OCEAN_ROOT + '/data/contentsource_nodes_1000'

if not os.path.exists(DATA_FILE):
#TODO: add logger
print "Please download contentsource_nodes_1000 for Ocean Don Corleone"
print "You can use this command: scp [email protected]:/webapps/ocean/data/contentsource_nodes_1000 . "


TEMP_SPIDERCRAB_CONFIG = OCEAN_ROOT + '/data/spidercrab_1000_test_config'
TEMP_SPIDERCRAB_STATS_EXPORT = \
OCEAN_ROOT + '/data/spidercrab_1000_test_stats'
Expand Down Expand Up @@ -142,4 +150,4 @@ def run_slave():
if not os.path.isfile(temp_file):
print '... no such a file or file.'
else:
os.remove(temp_file)
os.remove(temp_file)
5 changes: 3 additions & 2 deletions tests/spidercrab_correctness_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

import os
import time

import sys
sys.path.append(os.path.abspath(".."))
from don_corleone import don_utils as du

if __name__ == '__main__':
Expand Down Expand Up @@ -114,4 +115,4 @@
# Security stuff
for temp_file in files:
print 'Removing', temp_file
os.remove(temp_file)
os.remove(temp_file)
5 changes: 3 additions & 2 deletions tests/spidercrab_integrity_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
Testing of availability and communication of dependent system elements
NOTE: Does not harm graph database.
"""

import sys, os
sys.path.append(os.path.abspath(".."))
from graph_workers import odm_client
from don_corleone import don_utils as du

Expand Down Expand Up @@ -69,4 +70,4 @@ def warn_if_not_local():

print '\nChecking communication...'
assert(check_lionfish_communication())
print 'PASSED'
print 'PASSED'

0 comments on commit 118f63e

Please sign in to comment.