コード例 #1
0
ファイル: manager.py プロジェクト: starpolar/backend-1
    def __init__(self, clients, managers=None):
        super().__init__(clients, managers=managers)
        managers = managers or {}
        managers['chat'] = self
        self.block_manager = managers.get('block') or models.BlockManager(
            clients, managers=managers)
        self.chat_message_manager = managers.get(
            'chat_message') or models.ChatMessageManager(clients,
                                                         managers=managers)
        self.user_manager = managers.get('user') or models.UserManager(
            clients, managers=managers)

        self.clients = clients
        if 'dynamo' in clients:
            self.dynamo = ChatDynamo(clients['dynamo'])
            self.member_dynamo = ChatMemberDynamo(clients['dynamo'])
コード例 #2
0
ファイル: handlers.py プロジェクト: lovelyrrg51/real-backend
    clients.S3Client(S3_UPLOADS_BUCKET),
}

managers = {}
album_manager = managers.get('album') or models.AlbumManager(clients,
                                                             managers=managers)
appstore_manager = managers.get('appstore') or models.AppStoreManager(
    clients, managers=managers)
block_manager = managers.get('block') or models.BlockManager(clients,
                                                             managers=managers)
card_manager = managers.get('card') or models.CardManager(clients,
                                                          managers=managers)
chat_manager = managers.get('chat') or models.ChatManager(clients,
                                                          managers=managers)
chat_message_manager = managers.get(
    'chat_message') or models.ChatMessageManager(clients, managers=managers)
comment_manager = managers.get('comment') or models.CommentManager(
    clients, managers=managers)
feed_manager = managers.get('feed') or models.FeedManager(clients,
                                                          managers=managers)
follower_manager = managers.get('follower') or models.FollowerManager(
    clients, managers=managers)
like_manager = managers.get('like') or models.LikeManager(clients,
                                                          managers=managers)
post_manager = managers.get('post') or models.PostManager(clients,
                                                          managers=managers)
screen_manager = managers.get('screen') or models.ScreenManager(
    clients, managers=managers)
user_manager = managers.get('user') or models.UserManager(clients,
                                                          managers=managers)
コード例 #3
0
ファイル: conftest.py プロジェクト: lovelyrrg51/real-backend
def chat_message_manager(dynamo_client, appsync_client, cloudfront_client):
    yield models.ChatMessageManager({
        'appsync': appsync_client,
        'cloudfront': cloudfront_client,
        'dynamo': dynamo_client
    })