commit
3bd8ac5820
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "coolify",
|
||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.3",
|
||||
"license": "AGPL-3.0",
|
||||
"scripts": {
|
||||
"dev": "docker-compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev --host 0.0.0.0",
|
||||
|
@ -37,6 +37,9 @@ if (dev) {
|
||||
export const prisma = new PrismaClient(prismaOptions);
|
||||
|
||||
export function PrismaErrorHandler(e) {
|
||||
if (e! instanceof Error) {
|
||||
e = new Error(e.toString());
|
||||
}
|
||||
sentry.captureException(e);
|
||||
const payload = {
|
||||
status: e.status || 500,
|
||||
|
@ -122,7 +122,9 @@ buildWorker.on('completed', async (job: Bullmq.Job) => {
|
||||
} finally {
|
||||
const workdir = `/tmp/build-sources/${job.data.repository}/${job.data.build_id}`;
|
||||
await asyncExecShell(`rm -fr ${workdir}`);
|
||||
await asyncExecShell(`rm /tmp/build-sources/${job.data.repository}/id.rsa`);
|
||||
await asyncExecShell(
|
||||
`test -f /tmp/build-sources/${job.data.repository}/id.rsa && rm /tmp/build-sources/${job.data.repository}/id.rsa`
|
||||
);
|
||||
}
|
||||
return;
|
||||
});
|
||||
@ -136,7 +138,9 @@ buildWorker.on('failed', async (job: Bullmq.Job, failedReason) => {
|
||||
} finally {
|
||||
const workdir = `/tmp/build-sources/${job.data.repository}/${job.data.build_id}`;
|
||||
await asyncExecShell(`rm -fr ${workdir}`);
|
||||
await asyncExecShell(`rm /tmp/build-sources/${job.data.repository}/id.rsa`);
|
||||
await asyncExecShell(
|
||||
`test -f /tmp/build-sources/${job.data.repository}/id.rsa && rm /tmp/build-sources/${job.data.repository}/id.rsa`
|
||||
);
|
||||
}
|
||||
saveBuildLog({ line: 'Failed build!', buildId: job.data.build_id, applicationId: job.data.id });
|
||||
saveBuildLog({
|
||||
|
@ -14,12 +14,12 @@ export const get: RequestHandler = async (event) => {
|
||||
where: { buildId, time: { gt: sequence } },
|
||||
orderBy: { time: 'asc' }
|
||||
});
|
||||
const { status } = await db.prisma.build.findFirst({ where: { id: buildId } });
|
||||
const data = await db.prisma.build.findFirst({ where: { id: buildId } });
|
||||
|
||||
return {
|
||||
body: {
|
||||
logs,
|
||||
status
|
||||
status: data?.status || 'running'
|
||||
}
|
||||
};
|
||||
} catch (error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user