mirror of https://github.com/veops/cmdb.git
perf(api): ci delete (#297)
This commit is contained in:
parent
cf0ad7bad6
commit
c918d54ea5
|
@ -514,9 +514,9 @@ class CIManager(object):
|
||||||
ci_delete_trigger.apply_async(args=(trigger, OperateType.DELETE, ci_dict), queue=CMDB_QUEUE)
|
ci_delete_trigger.apply_async(args=(trigger, OperateType.DELETE, ci_dict), queue=CMDB_QUEUE)
|
||||||
|
|
||||||
attrs = CITypeAttribute.get_by(type_id=ci.type_id, to_dict=False)
|
attrs = CITypeAttribute.get_by(type_id=ci.type_id, to_dict=False)
|
||||||
attr_names = set([AttributeCache.get(attr.attr_id).name for attr in attrs])
|
attrs = [AttributeCache.get(attr.attr_id) for attr in attrs]
|
||||||
for attr_name in attr_names:
|
for attr in attrs:
|
||||||
value_table = TableMap(attr_name=attr_name).table
|
value_table = TableMap(attr=attr).table
|
||||||
for item in value_table.get_by(ci_id=ci_id, to_dict=False):
|
for item in value_table.get_by(ci_id=ci_id, to_dict=False):
|
||||||
item.delete(commit=False)
|
item.delete(commit=False)
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,7 @@ ONCE = {
|
||||||
}
|
}
|
||||||
|
|
||||||
# # SSO
|
# # SSO
|
||||||
|
AUTH_WITH_CAS = False
|
||||||
CAS_SERVER = "http://sso.xxx.com"
|
CAS_SERVER = "http://sso.xxx.com"
|
||||||
CAS_VALIDATE_SERVER = "http://sso.xxx.com"
|
CAS_VALIDATE_SERVER = "http://sso.xxx.com"
|
||||||
CAS_LOGIN_ROUTE = "/cas/built-in/cas/login"
|
CAS_LOGIN_ROUTE = "/cas/built-in/cas/login"
|
||||||
|
|
|
@ -48,9 +48,9 @@ services:
|
||||||
/wait
|
/wait
|
||||||
flask db-setup
|
flask db-setup
|
||||||
flask common-check-new-columns
|
flask common-check-new-columns
|
||||||
gunicorn --workers=3 autoapp:app -b 0.0.0.0:5000 -D
|
gunicorn --workers=8 autoapp:app -b 0.0.0.0:5000 -D
|
||||||
|
|
||||||
celery -A celery_worker.celery worker -E -Q one_cmdb_async --autoscale=5,2 --logfile=one_cmdb_async.log -D
|
celery -A celery_worker.celery worker -E -Q one_cmdb_async --autoscale=8,2 --logfile=one_cmdb_async.log -D
|
||||||
celery -A celery_worker.celery worker -E -Q acl_async --logfile=one_acl_async.log --concurrency=2 -D
|
celery -A celery_worker.celery worker -E -Q acl_async --logfile=one_acl_async.log --concurrency=2 -D
|
||||||
|
|
||||||
nohup flask cmdb-trigger > trigger.log 2>&1 &
|
nohup flask cmdb-trigger > trigger.log 2>&1 &
|
||||||
|
|
Loading…
Reference in New Issue