Compare commits

...
3 Commits
5 changed files with 25 additions and 17 deletions
+7 -7
View File
@@ -18,7 +18,7 @@
"@nestjs/microservices": "^8.4.3",
"@nestjs/platform-express": "^8.4.3",
"@nestjs/swagger": "^5.2.1",
"@victorradael/protospack": "^1.5.9",
"@victorradael/protospack": "^1.6.1",
"axios": "^0.25.0",
"dotenv": "^14.2.0",
"helmet": "^5.0.2",
@@ -2344,9 +2344,9 @@
}
},
"node_modules/@victorradael/protospack": {
"version": "1.5.9",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.5.9.tgz",
"integrity": "sha512-h96qwtRftVkZ0ftsahymnxO/bwCL8/bHvllyjTuhcLLmBj0fKG6q/nz5S9cFpq8OAEljehO+luNj388mZCF7Yg==",
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.6.1.tgz",
"integrity": "sha512-GEW+NYaMNnuUZ4/WsNJGpi3dHAOXkbm4BQKFkT/Ij7P9vSelyx9RGqkrs5m0biAXfITWDHe8hjI4AbRQe6AMDw==",
"dependencies": {
"rxjs": "^7.5.5"
}
@@ -10904,9 +10904,9 @@
}
},
"@victorradael/protospack": {
"version": "1.5.9",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.5.9.tgz",
"integrity": "sha512-h96qwtRftVkZ0ftsahymnxO/bwCL8/bHvllyjTuhcLLmBj0fKG6q/nz5S9cFpq8OAEljehO+luNj388mZCF7Yg==",
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.6.1.tgz",
"integrity": "sha512-GEW+NYaMNnuUZ4/WsNJGpi3dHAOXkbm4BQKFkT/Ij7P9vSelyx9RGqkrs5m0biAXfITWDHe8hjI4AbRQe6AMDw==",
"requires": {
"rxjs": "^7.5.5"
}
+1 -1
View File
@@ -30,7 +30,7 @@
"@nestjs/microservices": "^8.4.3",
"@nestjs/platform-express": "^8.4.3",
"@nestjs/swagger": "^5.2.1",
"@victorradael/protospack": "^1.5.9",
"@victorradael/protospack": "^1.6.1",
"axios": "^0.25.0",
"dotenv": "^14.2.0",
"helmet": "^5.0.2",
+7 -2
View File
@@ -191,13 +191,13 @@ export class PipelinesClientService implements OnModuleInit {
.subscribe({
next(x) {
const statusArray = x.status.sort((a, b) => {
if (Date.parse(a.updated_at) < Date.parse(b.updated_at)) {
if (a.id < b.id) {
return 1;
} else {
return -1;
}
});
resolve(statusArray);
resolve({ status: statusArray });
},
error(err) {
console.log('Observable Error');
@@ -223,6 +223,11 @@ export class PipelinesClientService implements OnModuleInit {
.triggerPipeline(objectSnakeToCamel({ id, info }))
.subscribe({
next(x) {
if (x.status == false) {
reject(
'This pipeline is not ready yet to execute, Try again later!',
);
}
resolve(x);
},
error(err) {
+9 -6
View File
@@ -6,12 +6,15 @@ class CatalogService {
body.info.customer.toLowerCase() === 'dadosfera'
? ``
: `-${body.info.customer.toLowerCase()}`;
const { data } = await axios.get(
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/all/`,
);
console.log(
`${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera/api/catalog/all/`,
);
const nimbusUrl =
process.env.ENV === 'prd'
? `https://nimbus${customer}.dadosfera.ai`
: `${process.env.NIMBUS_BASE_URL}${customer}.${process.env.ENV}.dadosfera`;
console.log(`${nimbusUrl}/api/catalog/all/`);
return 0;
const { data } = await axios.get(`${nimbusUrl}/api/catalog/all/`);
return data;
}
+1 -1
View File
File diff suppressed because one or more lines are too long