-
Notifications
You must be signed in to change notification settings - Fork 885
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable altering job schedule type through
alter_job
In #4664 we introduced fixed schedules for jobs. This was done by introducing additional parameters fixed_schedule, initial_start and timezone for our add_job and add_policy APIs. These fields were not updatable by alter_job so it was not possible to switch from one type of schedule to another without dropping and recreating existing jobs and policies. This patch adds the missing parameters to alter_job to enable switching from one type of schedule to another. Fixes #5681
- Loading branch information
Showing
32 changed files
with
578 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Implements: #5758 Enable altering job schedule type through `alter_job` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
DROP FUNCTION IF EXISTS @extschema@.alter_job( | ||
INTEGER, | ||
INTERVAL, | ||
INTERVAL, | ||
INTEGER, | ||
INTERVAL, | ||
BOOL, | ||
JSONB, | ||
TIMESTAMPTZ, | ||
BOOL, | ||
REGPROC | ||
); | ||
|
||
CREATE FUNCTION @extschema@.alter_job( | ||
job_id INTEGER, | ||
schedule_interval INTERVAL = NULL, | ||
max_runtime INTERVAL = NULL, | ||
max_retries INTEGER = NULL, | ||
retry_period INTERVAL = NULL, | ||
scheduled BOOL = NULL, | ||
config JSONB = NULL, | ||
next_start TIMESTAMPTZ = NULL, | ||
if_exists BOOL = FALSE, | ||
check_config REGPROC = NULL, | ||
fixed_schedule BOOL = NULL, | ||
initial_start TIMESTAMPTZ = NULL, | ||
timezone TEXT DEFAULT NULL | ||
) | ||
RETURNS TABLE (job_id INTEGER, schedule_interval INTERVAL, max_runtime INTERVAL, max_retries INTEGER, retry_period INTERVAL, scheduled BOOL, config JSONB, | ||
next_start TIMESTAMPTZ, check_config TEXT, fixed_schedule BOOL, initial_start TIMESTAMPTZ, timezone TEXT) | ||
AS '@MODULE_PATHNAME@', 'ts_job_alter' | ||
LANGUAGE C VOLATILE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
DROP FUNCTION IF EXISTS @extschema@.alter_job( | ||
INTEGER, | ||
INTERVAL, | ||
INTERVAL, | ||
INTEGER, | ||
INTERVAL, | ||
BOOL, | ||
JSONB, | ||
TIMESTAMPTZ, | ||
BOOL, | ||
REGPROC, | ||
BOOL, | ||
TIMESTAMPTZ, | ||
TEXT | ||
); | ||
|
||
CREATE FUNCTION @extschema@.alter_job( | ||
job_id INTEGER, | ||
schedule_interval INTERVAL = NULL, | ||
max_runtime INTERVAL = NULL, | ||
max_retries INTEGER = NULL, | ||
retry_period INTERVAL = NULL, | ||
scheduled BOOL = NULL, | ||
config JSONB = NULL, | ||
next_start TIMESTAMPTZ = NULL, | ||
if_exists BOOL = FALSE, | ||
check_config REGPROC = NULL | ||
) | ||
RETURNS TABLE (job_id INTEGER, schedule_interval INTERVAL, max_runtime INTERVAL, max_retries INTEGER, retry_period INTERVAL, scheduled BOOL, config JSONB, | ||
next_start TIMESTAMPTZ, check_config TEXT) | ||
AS '@MODULE_PATHNAME@', 'ts_job_alter' | ||
LANGUAGE C VOLATILE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.