-
Notifications
You must be signed in to change notification settings - Fork 6
HTM-1438: Delete scheduled task by setting search index schedule to no schedule #1044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
ab59390
60cfff5
84284e2
a23ae36
e974af9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -65,15 +65,12 @@ export class SearchIndexSchedulingComponent implements OnInit { | |||||||||||||||||||||||||||||||||||
| filter(() => this.isValidForm()), | ||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||
| .subscribe(value => { | ||||||||||||||||||||||||||||||||||||
| let schedule: TaskSchedule | undefined = undefined; | ||||||||||||||||||||||||||||||||||||
| if (value.cronExpression) { | ||||||||||||||||||||||||||||||||||||
| schedule = { | ||||||||||||||||||||||||||||||||||||
| ...this.taskSchedule, | ||||||||||||||||||||||||||||||||||||
| cronExpression: value.cronExpression, | ||||||||||||||||||||||||||||||||||||
| description: value.description, | ||||||||||||||||||||||||||||||||||||
| priority: value.priority, | ||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| const schedule = { | ||||||||||||||||||||||||||||||||||||
| ...this.taskSchedule, | ||||||||||||||||||||||||||||||||||||
| cronExpression: value.cronExpression || '', | ||||||||||||||||||||||||||||||||||||
| description: value.description, | ||||||||||||||||||||||||||||||||||||
| priority: value.priority, | ||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
| const schedule = { | |
| ...this.taskSchedule, | |
| cronExpression: value.cronExpression || '', | |
| description: value.description, | |
| priority: value.priority, | |
| }; | |
| let schedule: TaskSchedule | undefined; | |
| if (value.cronExpression && value.cronExpression.trim() !== '') { | |
| schedule = { | |
| ...this.taskSchedule, | |
| cronExpression: value.cronExpression, | |
| description: value.description, | |
| priority: value.priority, | |
| }; | |
| } else { | |
| schedule = undefined; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steinkobben this seems a valid concern, see also: #1044 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a check that prevents creating new schedules if the cron expression is empty. When there is an existing schedule, the schedule should be emitted with an empty cron expression because the parent component needs the schedule uuid to delete the task.
Uh oh!
There was an error while loading. Please reload this page.