Coder Social home page Coder Social logo

Comments (6)

nannan00 avatar nannan00 commented on June 7, 2024

已确认是bug,对于停用和启用,需要进行周期任务的删除和添加

from bk-user.

neronkl avatar neronkl commented on June 7, 2024

目录进行停用/启用的状态变更,传入参数:activated。

  1. PeriodTask 有开关字段enabled, 由该字段决定定时同步任务的开启/关闭
  2. 根据activated, 决定定时同步任务的enabled字段

from bk-user.

Canway-shiisa avatar Canway-shiisa commented on June 7, 2024

<目录删除>(https://github.com/TencentBlueKing/bk-user/issues/901) 的需求也涉及到定时同步任务的关停及启用问题,感觉这块在目录删除这里一并处理掉就可以?

  1. 任务暂停可以通过周期任务表PeriodTask 的enabled字段控制
  2. 任务删除的话 可以复用原来的任务删除逻辑 :
    def delete_periodic_sync_task(category_id: int):

    @nannan00

from bk-user.

neronkl avatar neronkl commented on June 7, 2024

<目录删除>(https://github.com/TencentBlueKing/bk-user/issues/901) 的需求也涉及到定时同步任务的关停及启用问题,感觉这块在目录删除这里一并处理掉就可以?

  1. 任务暂停可以通过周期任务表PeriodTask 的enabled字段控制

  2. 任务删除的话 可以复用原来的任务删除逻辑 :

    def delete_periodic_sync_task(category_id: int):

    @nannan00

定时任务的删除只是针对目录硬删除阶段

from bk-user.

nannan00 avatar nannan00 commented on June 7, 2024

可以,从目前产品设计来看,目录停用后才可以进行目录的删除或还原,

所以目录停用后 定时任务enabled=False

如果重新启用,则enabled=True
如果软删除,即放到回收站,则不变,还是维持enabled=False

进一步:
如果在回收站里硬删除,则删除定时任务
如果还原,是直接还原到停用状态还是直接启用?如果是直接启用,则需要变更定时任务enabled=True

from bk-user.

Canway-shiisa avatar Canway-shiisa commented on June 7, 2024

在 <回收站-目录删除> 中就进行修复

from bk-user.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.