Skip to content
Snippets Groups Projects
Commit 2b588173 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Fix IOC indexation

Regression from b9c1b838

Calling utils.trigger_ioc_repository_creation runs launch_task
which does a db.session.add(task). This raises:

SAWarning: Usage of the 'Session.add()' operation is not currently
supported within the execution stage of the flush process. Results may
not be consistent.  Consider using alternative event listeners or
connection-level operations instead.

SAWarning: Attribute history events accumulated on 1 previously clean
instances within inner-flush event handlers have been reset, and will
not result in database updates.

The result is that the host is not added to the elasticsearch index.

We can't trigger the task in after_update/after_insert events.
Perform the call in the view instead. It's temporary anyway. This should
be handled by IOC Factory.

JIRA INFRA-1015
parent e265aec4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment