klesh commented on code in PR #3813:
URL:
https://github.com/apache/incubator-devlake/pull/3813#discussion_r1033402687
##########
plugins/core/plugin_task.go:
##########
@@ -104,8 +104,14 @@ type PluginTask interface {
PrepareTaskData(taskCtx TaskContext, options map[string]interface{})
(interface{}, errors.Error)
}
-// CloseablePluginTask Extends PluginTask, and invokes a Close method after
all subtasks are done
+// CloseablePluginTask Extends PluginTask, and invokes a Close method after
all subtasks are done or fail
type CloseablePluginTask interface {
PluginTask
Close(taskCtx TaskContext) errors.Error
}
+
+// OnSuccessPluginTask Extends PluginTask, and invokes a Close method after
all subtasks are done
+type OnSuccessPluginTask interface {
Review Comment:
As we discussed, we should store `startFrom` and `lastUpdated` on framework
level `_devlake_collector_state` maybe?
In that case, we don't need this interface.
##########
plugins/jira/models/collector_meta.go:
##########
@@ -0,0 +1,35 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package models
+
+import (
+ "github.com/apache/incubator-devlake/models/common"
+ "time"
+)
+
+type JiraLatestCollectorMeta struct {
Review Comment:
This struct seems redundant, we can store `latestUpdated` / `startFrom` to
`_tool_jira_boards`.
Previously, `jira_boards` gets deleted on Extraction, but no more, we can
store them to `jira_boards` safely.
--
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]