Skip to content

Commit

Permalink
Don't remove source file if ingest service is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Tooseriuz committed Jun 21, 2024
1 parent 0f3464f commit 9d3b21e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion noncore/_utils/rfcx-audio/audio-transcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ exports.audioUtils = {
reject(err)
})
.on('end', function () {
if (!inputParams.keepFile) {
// Don't remove source file if ingest service is enabled
if (process.env.INGEST_SERVICE_ENABLED !== 'true') {
fs.unlink(inputParams.sourceFilePath, function (e) { if (e) { console.error(e) } })
}
resolve(transcodedFilePath)
Expand Down
1 change: 1 addition & 0 deletions noncore/_utils/rfcx-mqtt/mqtt-checkin-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ exports.checkInAssets = {
if (err) { console.error(err); reject(err) }

checkInObj.audio.meta.captureSampleCount = parseInt(stdout.trim())
assetUtils.deleteLocalFileFromFileSystem(wavFilePath)
resolve(checkInObj)
})
})
Expand Down

0 comments on commit 9d3b21e

Please sign in to comment.