-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Scheduler pipeline management: Pause/Resume (#30)
* Feature: Scheduler pipeline management: Pause/Resume * Update serializer --------- Co-authored-by: Jaseem Jas <[email protected]>
- Loading branch information
1 parent
27ca54e
commit 7aec6c5
Showing
7 changed files
with
104 additions
and
10 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
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,14 @@ | ||
from pipeline.models import Pipeline | ||
from rest_framework import serializers | ||
|
||
|
||
class PipelineUpdateSerializer(serializers.Serializer): | ||
pipeline_id = serializers.UUIDField(required=True) | ||
active = serializers.BooleanField(required=True) | ||
|
||
def validate_pipeline_id(self, value: str) -> str: | ||
try: | ||
Pipeline.objects.get(pk=value) | ||
except Pipeline.DoesNotExist: | ||
raise serializers.ValidationError("Invalid pipeline ID") | ||
return value |
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