Skip to content

Commit

Permalink
fix(ci_cache): ci cache async args (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanSung authored and pycook committed Oct 20, 2023
1 parent 8d17726 commit 2e85a99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmdb-api/api/views/cmdb/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ def get(self, ci_id=None):
from api.tasks.cmdb import ci_cache
from api.lib.cmdb.const import CMDB_QUEUE
if ci_id is not None:
ci_cache.apply_async([ci_id], queue=CMDB_QUEUE)
ci_cache.apply_async(args=(ci_id, None, None), queue=CMDB_QUEUE)
else:
cis = CI.get_by(to_dict=False)
for ci in cis:
ci_cache.apply_async([ci.id], queue=CMDB_QUEUE)
ci_cache.apply_async(args=(ci.id, None, None), queue=CMDB_QUEUE)

return self.jsonify(code=200)

Expand Down

0 comments on commit 2e85a99

Please sign in to comment.