-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat: add cronjob update #465
Conversation
…ken due to required tag conflicting for creation and update processes
This comment was marked as outdated.
This comment was marked as outdated.
…ture/cronjob-update
…reter properly and handle empty changes more politely
…is overstepped and overall optimise code
…ture/cronjob-update
Co-authored-by: Martin Helmich <m.helmich@mittwald.de>
…n and fix check timeout
…ture/cronjob-update # Conflicts: # src/commands/cronjob/update.tsx
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.
short inquiry
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.
final touches
src/commands/cronjob/create.tsx
Outdated
const cronjobCreationData: CronjobCreationData = { | ||
appId: appInstallationId, | ||
active: !disable, | ||
description, | ||
interval, | ||
email, | ||
destination, | ||
timeout: timeout.seconds, | ||
}; | ||
|
||
const { id: cronjobId } = await p.runStep("creating cron job", async () => { | ||
const r = await this.apiClient.cronjob.createCronjob({ | ||
projectId, | ||
data: cronjobCreationData, | ||
data: { | ||
appId: appInstallationId, | ||
active: !disable, | ||
description, | ||
interval, | ||
email, | ||
destination: buildCronjobDestination(url, command, interpreter), | ||
timeout: timeout.seconds, | ||
}, |
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.
For some reason I was under the impression that if a key has an undefined value, currently set values for conjobs (or whichever entity is being updated) will be overwritten, I played around for a bit and it seems to not be the case wich makes this approach the most concise.
No description provided.