Skip to content

Commit

Permalink
Schedule time updated for processor groups
Browse files Browse the repository at this point in the history
  • Loading branch information
dhanush-2397 committed Sep 20, 2023
1 parent 4a410b5 commit c6c8706
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 c6c8706

Please sign in to comment.