formbuilder fix

This commit is contained in:
IDONTSUDO 2024-04-17 15:21:40 +03:00
parent 2b8d0fa88b
commit f11dfa7e57
8 changed files with 113 additions and 104 deletions

View file

@ -6,15 +6,15 @@ import { MongoIdValidation } from "../../../core/validations/mongo_id_validation
import { DatasetDBModel } from "../models/dataset_database_model";
import { IDatasetModel } from "../models/dataset_validation_model";
import { ProcessWatcherAndDatabaseUpdateService } from "./create_dataset_scenario";
export class ExecDatasetProcessScenario extends CallbackStrategyWithIdQuery {
idValidationExpression = new MongoIdValidation();
call = async (id: string): ResponseBase => {
return (await new ReadByIdDataBaseModelUseCase<IDatasetModel>(DatasetDBModel).call(id)).map(async (model) => {
return (await new IsHaveActiveProcessUseCase().call()).map(async () => {
await DatasetDBModel.findById(id).updateOne({processStatus:"RUN"})
return new ExecProcessUseCase().call(
await DatasetDBModel.findById(id).updateOne({ processStatus: "RUN" });
return new ExecProcessUseCase().call(
`${model.project.rootDir}/`,
`python3 $PYTHON_BLENDER_PROC --path '${model.project.rootDir}/${model.name}/'`,
id,