feat: initial commit - massive-cloud point cloud processing system
This commit is contained in:
21
server/deviationHeatmapJobRunner.ts
Normal file
21
server/deviationHeatmapJobRunner.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'dotenv/config';
|
||||
import { runDeviationHeatmapJob } from './deviationHeatmapJob.js';
|
||||
|
||||
const [, , a, b, c] = process.argv;
|
||||
const resultId = Number(a);
|
||||
const taskId = Number(b);
|
||||
const totalPoints = Number(c);
|
||||
|
||||
if (!Number.isFinite(resultId) || !Number.isFinite(taskId) || resultId <= 0 || taskId <= 0) {
|
||||
console.error('[DeviationHeatmapJobRunner] 用法: <resultId> <taskId> <totalPoints>');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const pts = Number.isFinite(totalPoints) && totalPoints > 0 ? totalPoints : 400_000;
|
||||
|
||||
runDeviationHeatmapJob(resultId, taskId, pts)
|
||||
.then(() => process.exit(0))
|
||||
.catch((e) => {
|
||||
console.error('[DeviationHeatmapJobRunner]', e);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user