Improve MineGeo exploration and mapping features

This commit is contained in:
2026-10-05 13:41:36 +05:00
parent aec0641f87
commit c5368fa8cc
69 changed files with 3581 additions and 333 deletions

View File

@@ -29,10 +29,11 @@ const dataset = check(
);
if (
dataset.revision_id ||
dataset.parent_dataset_id ||
!["draft", "review", "rejected", "failed"].includes(dataset.state)
)
throw new Error(
"Only an unpublished, inactive draft can be reprocessed. Published revisions cannot be changed.",
"Only an unpublished, inactive original capture can be reprocessed. Published revisions cannot be changed. Contributions cannot be overwritten; upload a new capture instead.",
);
const job = check(
await client.from("upload_jobs").select("*").eq("dataset_id", id).single(),
@@ -48,6 +49,14 @@ const input = check(
.eq("dataset_id", id)
.single(),
);
if (
(input.manifest.availableViewpoints ?? input.manifest.viewpoints).some(
(p) => p.assetRoot,
)
)
throw new Error(
"This draft contains accepted contributions. Upload a new capture instead of reprocessing mixed media.",
);
if (dataset.source === "plugin") await prepareAssets();
// This maintenance command runs with the worker stopped. Compare-and-set