separate launching audit scheduler

Now there are only one scheduler for launching audit task and
executing audit jobs. We have found an exception where the scheduler
stops for some reason when executing audit.
In order to keep launching audit task normal, we need to split into
two schedulers.

Change-Id: I45dccaf062290cfc7d7fcfc27fe11d6f87f38afa
This commit is contained in:
licanwei
2019-04-19 14:30:09 +08:00
parent f52716fcf9
commit 0def7b4d38
2 changed files with 22 additions and 10 deletions

View File

@@ -462,7 +462,7 @@ class TestContinuousAuditHandler(base.DbTestCase):
def test_is_audit_inactive(self, mock_jobs):
audit_handler = continuous.ContinuousAuditHandler()
mock_jobs.return_value = mock.MagicMock()
audit_handler._scheduler = mock.MagicMock()
audit_handler._audit_scheduler = mock.MagicMock()
ap_jobs = [job.Job(mock.MagicMock(), name='execute_audit',
func=audit_handler.execute_audit,