Skip to content

Commit

Permalink
Merge pull request #297 from dhanush-2397/dev
Browse files Browse the repository at this point in the history
Dynamic cron expression created for data pull for all storage types
  • Loading branch information
dhanush-2397 authored Jan 31, 2024
2 parents 89a4ea7 + c734532 commit d8608c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ingestion/services/nvsk-api/processorGroup.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export class processorGroupSelectionForCloudService {

}
getProcessorGroupArrayForCloudStorage() {
const currentDate:Date = this.dateService.getCurrentISTTime()
const cronExpr = this.dateService.getCronExpression(currentDate);
if (process.env.STORAGE_TYPE === "oracle") {
const currentDate:Date = this.dateService.getCurrentISTTime()
const cronExpr = this.dateService.getCronExpression(currentDate);
return [
{ processor_group_name: "Run_adapters", scheduled_at: "0 */7 * * * ?" },
{
Expand All @@ -22,23 +22,23 @@ export class processorGroupSelectionForCloudService {
{ processor_group_name: "Run_adapters", scheduled_at: "0 */7 * * * ?" },
{
processor_group_name: "onestep_dataingestion_local",
scheduled_at: "0 */9 * * * ?",
scheduled_at: `${cronExpr}`,
},
];
} else if (process.env.STORAGE_TYPE === "aws") {
return [
{ processor_group_name: "Run_adapters", scheduled_at: "0 */7 * * * ?" },
{
processor_group_name: "onestep_dataingestion_aws",
scheduled_at: "0 */9 * * * ?",
scheduled_at: `${cronExpr}`,
},
];
} else {
return [
{ processor_group_name: "Run_adapters", scheduled_at: "0 */7 * * * ?" },
{
processor_group_name: "onestep_dataingestion_azure",
scheduled_at: "0 */9 * * * ?",
scheduled_at: `${cronExpr}`,
},
];
}
Expand Down

0 comments on commit d8608c1

Please sign in to comment.