d4x1 commented on code in PR #7032:
URL:
https://github.com/apache/incubator-devlake/pull/7032#discussion_r1504149141
##########
backend/python/pydevlake/pydevlake/subtasks.py:
##########
@@ -206,9 +207,13 @@ def process(self, tool_model: ToolModel, session: Session,
ctx: Context):
def _save(self, tool_model: ToolModel, domain_model: DomainModel, session:
Session, connection_id: int):
domain_model.set_tool_origin(tool_model)
+ domain_model.set_updated_at()
if isinstance(domain_model, DomainModel):
domain_model.id = tool_model.domain_id()
session.merge(domain_model)
def delete(self, session, ctx):
- pass
\ No newline at end of file
+ domain_models = self.stream.domain_tables
+ if domain_models is not None:
+ for domain_model in domain_models:
+
session.execute(sql.delete(domain_model).where(domain_model.raw_data_params ==
self._params(ctx)))
Review Comment:
Updated.
##########
backend/python/pydevlake/pydevlake/model.py:
##########
@@ -125,13 +128,17 @@ def set_tool_origin(self, tool_model: 'ToolModel'):
class NoPKModel(RawDataOrigin):
- created_at: Optional[datetime] = Field(
+ created_at: Optional[datetime] = Field(
Review Comment:
Updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]