This commit is contained in:
parent
3cfd48a807
commit
6f6fd88e67
13
.foreverignore
Normal file
13
.foreverignore
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
node_modules/*
|
||||||
|
public/*
|
||||||
|
views/*
|
||||||
|
misc/*
|
||||||
|
*.html
|
||||||
|
*.jpeg
|
||||||
|
*.png
|
||||||
|
*.mp3
|
||||||
|
*.wav
|
||||||
|
*.md
|
||||||
|
*.sqlite3
|
||||||
|
*-journal
|
||||||
|
sessions
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -75,9 +75,6 @@ typings/
|
|||||||
# FuseBox cache
|
# FuseBox cache
|
||||||
.fusebox/
|
.fusebox/
|
||||||
|
|
||||||
# Forever
|
|
||||||
.foreverignore
|
|
||||||
|
|
||||||
# old Scripts
|
# old Scripts
|
||||||
_old/
|
_old/
|
||||||
|
|
||||||
|
|||||||
24378
misc/hexagon_brb_2km.geojson
Executable file
24378
misc/hexagon_brb_2km.geojson
Executable file
File diff suppressed because it is too large
Load Diff
@ -5,8 +5,8 @@ var app = express();
|
|||||||
var http = require('http') //.Server(app);
|
var http = require('http') //.Server(app);
|
||||||
var https = require('https'); //.Server(app);
|
var https = require('https'); //.Server(app);
|
||||||
var webserver = https.createServer({
|
var webserver = https.createServer({
|
||||||
key: fs.readFileSync('./server/server.key', 'utf8'),
|
key: fs.readFileSync('./misc/server.key', 'utf8'),
|
||||||
cert: fs.readFileSync('./server/server.cert', 'utf8')
|
cert: fs.readFileSync('./misc/server.cert', 'utf8')
|
||||||
}, app);
|
}, app);
|
||||||
var io = require('socket.io').listen(webserver);
|
var io = require('socket.io').listen(webserver);
|
||||||
var async = require('async');
|
var async = require('async');
|
||||||
|
|||||||
@ -54,9 +54,11 @@ module.exports = function(io, sql, async, app_cfg) {
|
|||||||
sql.db_update_client_status(io.sockets.sockets[socket_id], waip_id);
|
sql.db_update_client_status(io.sockets.sockets[socket_id], waip_id);
|
||||||
// Sound erstellen
|
// Sound erstellen
|
||||||
tts_erstellen(app_cfg, socket_id, einsatzdaten, function(tts) {
|
tts_erstellen(app_cfg, socket_id, einsatzdaten, function(tts) {
|
||||||
|
if (tts) {
|
||||||
// Sound senden
|
// Sound senden
|
||||||
sql.db_log('WAIP', 'ttsfile: ' + tts);
|
sql.db_log('WAIP', 'ttsfile: ' + tts);
|
||||||
io.sockets.to(socket_id).emit('io.playtts', tts);
|
io.sockets.to(socket_id).emit('io.playtts', tts);
|
||||||
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -179,12 +181,13 @@ module.exports = function(io, sql, async, app_cfg) {
|
|||||||
var childD = proc.spawn('/bin/sh', commands);
|
var childD = proc.spawn('/bin/sh', commands);
|
||||||
childD.stdin.setEncoding('ascii');
|
childD.stdin.setEncoding('ascii');
|
||||||
childD.stderr.setEncoding('ascii');
|
childD.stderr.setEncoding('ascii');
|
||||||
childD.stderr.on('data', function(data) {
|
childD.on('exit', function(code, signal) {
|
||||||
sql.db_log('Fehler-TTS', data);
|
if (code > 0) {
|
||||||
|
sql.db_log('Fehler-TTS', 'Exit-Code '+ code +'; Fehler beim erstellen der TTS-Datei');
|
||||||
callback && callback(null);
|
callback && callback(null);
|
||||||
});
|
} else {
|
||||||
childD.on('exit', function() {
|
|
||||||
callback && callback(mp3_url);
|
callback && callback(mp3_url);
|
||||||
|
};
|
||||||
});
|
});
|
||||||
childD.stdin.end();
|
childD.stdin.end();
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user