[plugins][migration] status_log -> logging (#40)
[plugins][migration] status_log -> logging Co-authored-by: Kassian Sun <kassiansun@outlook.com>
This commit is contained in:
parent
df6b4a1737
commit
633d0333f2
|
@ -7,6 +7,11 @@ package migration
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
|
"strings"
|
||||||
|
"syscall"
|
||||||
|
"time"
|
||||||
|
|
||||||
log "github.com/cihub/seelog"
|
log "github.com/cihub/seelog"
|
||||||
"infini.sh/console/model"
|
"infini.sh/console/model"
|
||||||
"infini.sh/framework/core/config"
|
"infini.sh/framework/core/config"
|
||||||
|
@ -19,10 +24,6 @@ import (
|
||||||
task2 "infini.sh/framework/core/task"
|
task2 "infini.sh/framework/core/task"
|
||||||
"infini.sh/framework/core/util"
|
"infini.sh/framework/core/util"
|
||||||
"infini.sh/framework/modules/elastic/common"
|
"infini.sh/framework/modules/elastic/common"
|
||||||
"math"
|
|
||||||
"strings"
|
|
||||||
"syscall"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type DispatcherProcessor struct {
|
type DispatcherProcessor struct {
|
||||||
|
@ -409,7 +410,7 @@ func (p *DispatcherProcessor) handlePendingStopSubTask(taskItem *task2.Task) err
|
||||||
"size": len(taskIDs),
|
"size": len(taskIDs),
|
||||||
"sort": []util.MapStr{
|
"sort": []util.MapStr{
|
||||||
{
|
{
|
||||||
"payload.pipeline.status_log.steps": util.MapStr{
|
"payload.pipeline.logging.steps": util.MapStr{
|
||||||
"order": "desc",
|
"order": "desc",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -432,7 +433,7 @@ func (p *DispatcherProcessor) handlePendingStopSubTask(taskItem *task2.Task) err
|
||||||
}
|
}
|
||||||
MainLoop:
|
MainLoop:
|
||||||
for _, hit := range searchRes.Hits.Hits {
|
for _, hit := range searchRes.Hits.Hits {
|
||||||
status, _ := util.MapStr(hit.Source).GetValue("payload.pipeline.status_log.status")
|
status, _ := util.MapStr(hit.Source).GetValue("payload.pipeline.logging.status")
|
||||||
if status != "STOPPED" {
|
if status != "STOPPED" {
|
||||||
//call instance api to stop scroll/bulk_indexing pipeline task
|
//call instance api to stop scroll/bulk_indexing pipeline task
|
||||||
if instID, ok := taskItem.Metadata.Labels["execution_instance_id"].(string); ok {
|
if instID, ok := taskItem.Metadata.Labels["execution_instance_id"].(string); ok {
|
||||||
|
@ -1228,7 +1229,6 @@ func (p *DispatcherProcessor) getTaskCompleteState(subTask *task2.Task) (*TaskCo
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
esClient := elastic.GetClient(p.config.Elasticsearch)
|
esClient := elastic.GetClient(p.config.Elasticsearch)
|
||||||
|
@ -1354,7 +1354,6 @@ func (p *DispatcherProcessor) getMajorTaskState(majorTask *task2.Task) (taskStat
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
esClient := elastic.GetClient(p.config.Elasticsearch)
|
esClient := elastic.GetClient(p.config.Elasticsearch)
|
||||||
|
|
Loading…
Reference in New Issue