format
This commit is contained in:
@@ -36,7 +36,8 @@ export const runCQ = async ({
|
||||
)
|
||||
await runCommand(
|
||||
`cat ${stlPath} /var/task/cadhub-concat-split /tmp/${tempFile}/metadata.json | gzip > ${fullPath}`,
|
||||
15000, true
|
||||
15000,
|
||||
true
|
||||
)
|
||||
return { consoleMessage, fullPath }
|
||||
} catch (error) {
|
||||
|
||||
@@ -23,7 +23,11 @@ export async function writeFiles(
|
||||
return tempFile
|
||||
}
|
||||
|
||||
export async function runCommand(command, timeout = 5000, shouldRejectStdErr = false): Promise<string> {
|
||||
export async function runCommand(
|
||||
command,
|
||||
timeout = 5000,
|
||||
shouldRejectStdErr = false
|
||||
): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
exec(command, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
@@ -124,7 +128,9 @@ export async function storeAssetAndReturnUrl({
|
||||
console.log('read file error', e)
|
||||
const response = {
|
||||
statusCode: 400,
|
||||
body: Buffer.from(JSON.stringify({ error: consoleMessage, fullPath })).toString('base64'),
|
||||
body: Buffer.from(
|
||||
JSON.stringify({ error: consoleMessage, fullPath })
|
||||
).toString('base64'),
|
||||
isBase64Encoded: true,
|
||||
}
|
||||
callback(null, response)
|
||||
|
||||
Reference in New Issue
Block a user