fix: skip read data for doctor operation
Some checks failed
Release Workflow / determine-release-type (push) Has been cancelled
Release Workflow / checks (push) Has been cancelled
Release Workflow / e2e-tests (push) Has been cancelled
Release Workflow / build-images (push) Has been cancelled
Release Workflow / publish-release (push) Has been cancelled
Some checks failed
Release Workflow / determine-release-type (push) Has been cancelled
Release Workflow / checks (push) Has been cancelled
Release Workflow / e2e-tests (push) Has been cancelled
Release Workflow / build-images (push) Has been cancelled
Release Workflow / publish-release (push) Has been cancelled
This commit is contained in:
parent
726bd5d06f
commit
7d131719b7
2 changed files with 2 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ const runUnlockStep = async (config: RepositoryConfig, signal?: AbortSignal) =>
|
|||
|
||||
const runCheckStep = async (config: RepositoryConfig, signal: AbortSignal) => {
|
||||
const orgId = getOrganizationId();
|
||||
const result = await restic.check(config, { readData: true, signal, organizationId: orgId }).then(
|
||||
const result = await restic.check(config, { readData: false, signal, organizationId: orgId }).then(
|
||||
(result) => result,
|
||||
(error) => ({ success: false, output: null, error: toMessage(error), hasErrors: true }),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -397,6 +397,7 @@ const cancelDoctor = async (id: string) => {
|
|||
|
||||
const abortController = runningDoctors.get(repository.id);
|
||||
if (!abortController) {
|
||||
await db.update(repositoriesTable).set({ status: "unknown" }).where(eq(repositoriesTable.id, repository.id));
|
||||
throw new ConflictError("No doctor operation is currently running");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue