(self, comment_item: Dict)
| 180 | return result.first() is not None |
| 181 | |
| 182 | async def store_comment(self, comment_item: Dict): |
| 183 | if not comment_item: |
| 184 | return |
| 185 | async with get_session() as session: |
| 186 | comment_id = comment_item.get("comment_id") |
| 187 | if not comment_id: |
| 188 | return |
| 189 | if await self.comment_is_exist(session, comment_id): |
| 190 | await self.update_comment(session, comment_item) |
| 191 | else: |
| 192 | await self.add_comment(session, comment_item) |
| 193 | |
| 194 | async def add_comment(self, session: AsyncSession, comment_item: Dict): |
| 195 | add_ts = int(get_current_timestamp()) |
no test coverage detected