feat: add pause/unpause functionality for scheduled jobs (#2698)

This commit is contained in:
Max Novich
2025-05-28 12:20:03 -07:00
committed by GitHub
parent feb7b15c76
commit ea6a7a7847
10 changed files with 484 additions and 20 deletions
+66
View File
@@ -539,6 +539,39 @@
}
}
},
"/schedule/{id}/pause": {
"post": {
"tags": [
"schedule"
],
"operationId": "pause_schedule",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the schedule to pause",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Scheduled job paused successfully"
},
"400": {
"description": "Cannot pause a currently running job"
},
"404": {
"description": "Scheduled job not found"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/schedule/{id}/run_now": {
"post": {
"tags": [
@@ -623,6 +656,36 @@
}
}
},
"/schedule/{id}/unpause": {
"post": {
"tags": [
"schedule"
],
"operationId": "unpause_schedule",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the schedule to unpause",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Scheduled job unpaused successfully"
},
"404": {
"description": "Scheduled job not found"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/sessions": {
"get": {
"tags": [
@@ -1703,6 +1766,9 @@
"format": "date-time",
"nullable": true
},
"paused": {
"type": "boolean"
},
"source": {
"type": "string"
}