-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Add support for scheduled executions #8243
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
Conversation
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.
LGTM
[ | ||
'$id' => ID::custom('data'), | ||
'type' => Database::VAR_STRING, | ||
'format' => '', | ||
'size' => 65535, | ||
'signed' => true, | ||
'required' => false, | ||
'default' => new \stdClass(), | ||
'array' => false, | ||
'filters' => ['json', 'encrypt'], | ||
], |
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.
Will we need a migration for this?
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.
We need to add a column, but it doesn't require migration - patch script is enough. Like we did for some billing columns and tables.
$dbForConsole->createDocument('schedules', new Document([ | ||
'region' => System::getEnv('_APP_REGION', 'default'), | ||
'resourceType' => 'execution', | ||
'resourceId' => $execution->getId(), | ||
'resourceInternalId' => $execution->getInternalId(), | ||
'resourceUpdatedAt' => DateTime::now(), | ||
'projectId' => $project->getId(), | ||
'schedule' => $scheduledAt, | ||
'data' => $data, | ||
'active' => true, | ||
])); |
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.
If logging
is false for the function, we'll create a schedule, but the execution won't exist
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.
In another PR, for 1.6, we are making it so logging=false still creates document. We can ignore this bug, as it wont be there once all PRs are merged.
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.
Approving this for Q/A release, confirming that the naming changes required will be taken care of during QA week.
What does this PR do?
Adds parameter to
createExecution
to allow execution in the future, similarly to how messages can also be scheduled for later.Fixes #5489
Test Plan
Related PRs and Issues
Checklist