Skip to content

Commit

Permalink
Merge pull request #279 from dhanush-2397/dev
Browse files Browse the repository at this point in the history
Changes for Schedule Time
  • Loading branch information
htvenkatesh authored Sep 20, 2023
2 parents 5f6bff2 + ceac4fa commit 8fa5684
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/ingestion/services/nvsk-api/nvsk-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,11 @@ export class NvskApiService {
try {
let promises=[]
let url = `${process.env.SPEC_URL}` + '/schedule'
let processorGroups = ['Run_adapters','onestep_dataingestion_aws'];
let processorGroups = [{"processor_group_name":"Run_adapters","scheduled_at":"0 */7 * * * ?"},
{"processor_group_name":"onestep_dataingestion_aws","scheduled_at":"0 */9 * * * ?"}];
for(let pgName of processorGroups){
let scheduleBody = {
"processor_group_name": `${pgName}`,
"scheduled_at": "0 */7 * * * ?"
}
console.log("The schedule is:", scheduleBody);
promises.push(this.httpService.post(url, scheduleBody))
console.log("The schedule is:", pgName);
promises.push(this.httpService.post(url, pgName))
}
await Promise.all(promises)
} catch (err) {
Expand Down

0 comments on commit 8fa5684

Please sign in to comment.