hanging commit

This commit is contained in:
Michael Peters 2022-12-17 14:05:37 -08:00
parent 641161a912
commit a9b2ad499e
4 changed files with 7 additions and 5 deletions

View File

@ -68,7 +68,7 @@ Actions.registerLogger = function(process, log) {
// Starts a process and handles general errors
Actions.spawnProcess = function(name, command, args) {
let process = child_process.spawn(command, args);
LOG.info(`spawned ${name} ${process.pid}`);
LOG.info(`spawned ${name} ${process.pid}`, { name: name, command: command, args: args });
process.on('close', (code, signal) => {
LOG.silly(`${name} ${process.pid} closed, code: ${code}, signal: ${signal}`);
});
@ -90,7 +90,9 @@ Actions.spawnProcess = function(name, command, args) {
* @returns the child process that was spawned
*/
Actions.startRecording = function(song) {
let device = 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor';
// pacmd list-sinks
//let device = 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor';
let device = 'alsa_output.pci-0000_00_1b.0.analog-stereo.monitor';
let output = '../intermediate/' + song.guid + '.wav';
// -v for verbose output
let recording_process = Actions.spawnProcess(

View File

@ -1,4 +1,4 @@
const electron = require('electron');
const electron = require('electron').remote;
const http = require('http');
const Actions = require('./actions.js');
@ -56,13 +56,13 @@ async function stopRecordingStartConversion() {
LOG.debug(`${conversionSong.filename} starting conversion...`);
let conversionProcess = Actions.convertToMp3(conversionSong);
Actions.registerLogger(conversionProcess, CVRTLOG);
conversionProcess.on('exit', (code, signal) => {
conversionProcess.on('close', (code, signal) => {
LOG.info(`${conversionSong.filename} completed conversion`);
LOG.debug(`${conversionSong.filename} starting adding metadata...`);
let metadataProcess = Actions.addMetadata(conversionSong);
Actions.registerLogger(metadataProcess, METALOG);
metadataProcess.on('exit', (code, signal) => {
metadataProcess.on('close', (code, signal) => {
LOG.info(`${conversionSong.filename} completed adding metadata`);
Actions.removeIntermediate(conversionSong);
});

0
logger/logger.js Executable file → Normal file
View File

0
logger/package.json Executable file → Normal file
View File