Dev api 231229 (#345)

* fix(api): predefined value for float

* feat(api): update public clouds config

* feat(api): commands add-user support is_admin
This commit is contained in:
pycook
2023-12-29 13:44:23 +08:00
committed by GitHub
parent 5c8e93e194
commit a23bdab10e
7 changed files with 1285 additions and 1661 deletions

View File

@@ -5,6 +5,7 @@ import copy
import datetime
import json
import time
import uuid
import click
import requests
@@ -176,6 +177,11 @@ def cmdb_counter():
from api.lib.cmdb.cache import CMDBCounterCache
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='worker@xxx.com')
login_user(UserCache.get('worker'))
while True:
try: