zhangzengfei
2024-12-20 7a554fb61db8cd5c7a1986124d007cae9dff2175
添加调试日志
2个文件已修改
9 ■■■■■ 已修改文件
cron/cron.go 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/disappear.go 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cron/cron.go
@@ -33,9 +33,11 @@
        t := task
        safe.Go(func() {
            if err := model.Init(t); err != nil {
                logger.Warnf("Init task %s. %s", t.Name, err.Error())
                return
            }
            if err := model.Run(); err != nil {
                logger.Warnf("Run task %s. %s", t.Name, err.Error())
                return
            }
            if err := model.Shutdown(); err != nil {
models/disappear.go
@@ -119,6 +119,8 @@
        if len(ageFilter) == 0 {
            return fmt.Errorf("no results found that match the age condition %d", m.PersonAge)
        }
        logger.Debugf("match age result %d", len(ageFilter))
    }
    if m.PersonLabel != "" {
@@ -147,6 +149,8 @@
        if len(labelFilter) == 0 {
            return fmt.Errorf("no results found that match the label condition %s", m.PersonLabel)
        }
        logger.Debugf("match label result %d", len(labelFilter))
    }
    // 合并一下条件
@@ -182,6 +186,8 @@
        if err != nil {
            logger.Warnf(err.Error())
        }
        logger.Debugf("match key person result %d", len(keyFilter))
    }
    if len(lastFilter) > 0 {
@@ -190,6 +196,7 @@
        lastFilter = keyFilter
    }
    logger.Debugf("last result %d", len(lastFilter))
    for _, p := range lastFilter {
        if len(m.AreaIds) > 0 {
            _, o1 := m.AreaIds[p.CommunityId]