Skip to content

Commit

Permalink
fix(api): date trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
pycook committed Dec 23, 2024
1 parent 747475b commit aaa4ca1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmdb-api/api/commands/click_cmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ def cmdb_trigger():
"""
from api.lib.cmdb.ci import CITriggerManager

current_app.test_request_context().push()
if not UserCache.get('worker'):
from api.lib.perm.acl.user import UserCRUD
UserCRUD.add(username='worker', password=uuid.uuid4().hex, email='[email protected]')
login_user(UserCache.get('worker'))

current_day = datetime.datetime.today().strftime("%Y-%m-%d")
trigger2cis = dict()
trigger2completed = dict()
Expand Down

0 comments on commit aaa4ca1

Please sign in to comment.