clean up
This commit is contained in:
parent
69887c2eef
commit
08502caa38
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,7 +1,11 @@
|
|||||||
build/
|
build/
|
||||||
concordia.cfg
|
concordia.cfg
|
||||||
|
concordia-server/config.hpp
|
||||||
index/
|
index/
|
||||||
scripts/concordia-server.PID
|
scripts/concordia-server.PID
|
||||||
|
scripts/start.sh
|
||||||
|
scripts/stop.sh
|
||||||
|
scripts/restart.sh
|
||||||
db/pgbouncer.log
|
db/pgbouncer.log
|
||||||
db/pgbouncer.pid
|
db/pgbouncer.pid
|
||||||
|
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
#define CONFIG_FILE_PATH "/home/rafalj/projects/concordia-server/concordia.cfg"
|
|
||||||
|
|
||||||
// database connection information
|
|
||||||
#define DB_NAME "concordia_server"
|
|
||||||
#define DB_USER "concordia"
|
|
||||||
#define DB_PASSWORD "concordia"
|
|
||||||
#define DB_HOST "localhost"
|
|
||||||
#define DB_PORT "6543"
|
|
||||||
|
|
||||||
// json syntax
|
|
||||||
#define OPERATION_PARAM "operation"
|
|
||||||
#define PATTERN_PARAM "pattern"
|
|
||||||
#define SOURCE_SENTENCE_PARAM "sourceSentence"
|
|
||||||
#define TARGET_SENTENCE_PARAM "targetSentence"
|
|
||||||
#define TM_ID_PARAM "tmId"
|
|
||||||
#define SENTENCES_PARAM "sentences"
|
|
||||||
|
|
||||||
#define ADD_SENTENCE_OP "addSentence"
|
|
||||||
#define ADD_SENTENCES_OP "addSentences"
|
|
||||||
#define REFRESH_INDEX_OP "refreshIndex"
|
|
||||||
#define SIMPLE_SEARCH_OP "simpleSearch"
|
|
||||||
#define CONCORDIA_SEARCH_OP "concordiaSearch"
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "restarting concordia-server"
|
|
||||||
|
|
||||||
/home/rafalj/projects/concordia-server/scripts/stop.sh
|
|
||||||
/home/rafalj/projects/concordia-server/scripts/start.sh
|
|
@ -1,23 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
nginxProcesses=`ps aux | grep nginx | wc -l`
|
|
||||||
if [ $nginxProcesses -le 1 ]
|
|
||||||
then
|
|
||||||
echo "nginx is not running" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
pidFile="/home/rafalj/projects/concordia-server/scripts/concordia-server.PID"
|
|
||||||
|
|
||||||
if [ -e $pidFile ]
|
|
||||||
then
|
|
||||||
echo "concordia server is already running with PID:" `cat $pidFile` >&2
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
spawn-fcgi -p 8000 -n "/home/rafalj/projects/concordia-server/build/concordia-server"/concordia_server_process &
|
|
||||||
echo $! > $pidFile
|
|
||||||
echo "concordia-server started with PID:" `cat $pidFile`
|
|
||||||
fi
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
pidFile="/home/rafalj/projects/concordia-server/scripts/concordia-server.PID"
|
|
||||||
|
|
||||||
if [ -e $pidFile ]
|
|
||||||
then
|
|
||||||
pid=`cat $pidFile`
|
|
||||||
rm $pidFile
|
|
||||||
kill $pid
|
|
||||||
echo "concordia-server stopped"
|
|
||||||
else
|
|
||||||
echo "no PID file found at:" $pidFile "- is concordia-server running?" >&2
|
|
||||||
fi
|
|
||||||
|
|
@ -13,7 +13,7 @@ data = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start = time.time()
|
start = time.time()
|
||||||
req = urllib2.Request('http://localhost')
|
req = urllib2.Request('http://localhost:8800')
|
||||||
req.add_header('Content-Type', 'application/json')
|
req.add_header('Content-Type', 'application/json')
|
||||||
response = json.loads(urllib2.urlopen(req, json.dumps(data)).read())
|
response = json.loads(urllib2.urlopen(req, json.dumps(data)).read())
|
||||||
end = time.time()
|
end = time.time()
|
||||||
|
Loading…
Reference in New Issue
Block a user