-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: #493 Add Celery workers to the stack
- Loading branch information
Showing
116 changed files
with
3,870 additions
and
2,321 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
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 |
---|---|---|
|
@@ -10,4 +10,6 @@ docs/ | |
|
||
# Coverage | ||
.coverage | ||
coverage.xml | ||
coverage.xml | ||
|
||
scripts/runtime/email/renderer/* |
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
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
packages/backend/apps/users/services/export/email_serializers.py
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 rest_framework import serializers | ||
|
||
|
||
class UserDataExportEmailBaseSerializer(serializers.Serializer): | ||
email = serializers.CharField() | ||
export_url = serializers.CharField() | ||
|
||
|
||
class UserDataExportEmailSerializer(serializers.Serializer): | ||
data = UserDataExportEmailBaseSerializer() | ||
|
||
|
||
class AdminDataExportEmailSerializer(serializers.Serializer): | ||
data = UserDataExportEmailBaseSerializer(many=True) |
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,18 @@ | ||
from common import emails | ||
from . import email_serializers | ||
from . import constants | ||
|
||
|
||
class DataExportEmail(emails.Email): | ||
def __init__(self, to: str, data: dict): | ||
super().__init__(to=to, data=data) | ||
|
||
|
||
class UserDataExportEmail(DataExportEmail): | ||
name = constants.UserEmails.USER_EXPORT | ||
serializer_class = email_serializers.UserDataExportEmailSerializer | ||
|
||
|
||
class AdminDataExportEmail(DataExportEmail): | ||
name = constants.UserEmails.USER_EXPORT_ADMIN | ||
serializer_class = email_serializers.AdminDataExportEmailSerializer |
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,18 @@ | ||
from typing import Protocol, Type, Union | ||
from pydantic import BaseModel | ||
from ...models import User | ||
|
||
|
||
class UserDataExportable(Protocol): | ||
export_key: str | ||
schema_class: Type[BaseModel] | ||
|
||
@classmethod | ||
def export(cls, user: User) -> Union[str, list[str]]: | ||
... | ||
|
||
|
||
class UserFilesExportable(Protocol): | ||
@classmethod | ||
def export(cls, user: User) -> list[str]: | ||
... |
File renamed without changes.
Oops, something went wrong.