From dd1a651b5895cfdb8a141a56aa824ed4d082c41a Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 11 Sep 2020 22:14:48 +0800 Subject: Move all push update operations to a queue (#10133) * Fix test * Add no queue for test only * improve code * Auto watch whatever branch operation * Fix lint * Rename noqueue to immediate * Remove old PushUpdate function * Fix tests Co-authored-by: zeripath Co-authored-by: techknowlogick --- integrations/mssql.ini.tmpl | 5 ++++- integrations/mysql.ini.tmpl | 5 ++++- integrations/mysql8.ini.tmpl | 4 ++++ integrations/pgsql.ini.tmpl | 5 ++++- integrations/sqlite.ini.tmpl | 3 +++ 5 files changed, 19 insertions(+), 3 deletions(-) (limited to 'integrations') diff --git a/integrations/mssql.ini.tmpl b/integrations/mssql.ini.tmpl index cfb3594126..054f848bbe 100644 --- a/integrations/mssql.ini.tmpl +++ b/integrations/mssql.ini.tmpl @@ -17,6 +17,9 @@ REPO_INDEXER_PATH = integrations/indexers-mssql/repos.bleve [queue.code_indexer] TYPE = immediate +[queue.push_update] +TYPE = immediate + [repository] ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-mssql/gitea-repositories @@ -89,4 +92,4 @@ LEVEL = Debug [security] INSTALL_LOCK = true SECRET_KEY = 9pCviYTWSb -INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ +INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ \ No newline at end of file diff --git a/integrations/mysql.ini.tmpl b/integrations/mysql.ini.tmpl index 5211a4693a..1bdd95834c 100644 --- a/integrations/mysql.ini.tmpl +++ b/integrations/mysql.ini.tmpl @@ -19,6 +19,9 @@ REPO_INDEXER_PATH = integrations/indexers-mysql/repos.bleve [queue.code_indexer] TYPE = immediate +[queue.push_update] +TYPE = immediate + [repository] ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-mysql/gitea-repositories @@ -109,4 +112,4 @@ LEVEL = Debug [security] INSTALL_LOCK = true SECRET_KEY = 9pCviYTWSb -INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ +INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ \ No newline at end of file diff --git a/integrations/mysql8.ini.tmpl b/integrations/mysql8.ini.tmpl index ca77babf4b..e87b9c7944 100644 --- a/integrations/mysql8.ini.tmpl +++ b/integrations/mysql8.ini.tmpl @@ -17,6 +17,9 @@ REPO_INDEXER_PATH = integrations/indexers-mysql8/repos.bleve [queue.code_indexer] TYPE = immediate +[queue.push_update] +TYPE = immediate + [repository] ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-mysql8/gitea-repositories @@ -83,3 +86,4 @@ LEVEL = Debug INSTALL_LOCK = true SECRET_KEY = 9pCviYTWSb INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ + diff --git a/integrations/pgsql.ini.tmpl b/integrations/pgsql.ini.tmpl index 802296cf63..5a2a2d6a57 100644 --- a/integrations/pgsql.ini.tmpl +++ b/integrations/pgsql.ini.tmpl @@ -18,6 +18,9 @@ REPO_INDEXER_PATH = integrations/indexers-pgsql/repos.bleve [queue.code_indexer] TYPE = immediate +[queue.push_update] +TYPE = immediate + [repository] ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-pgsql/gitea-repositories @@ -90,4 +93,4 @@ LEVEL = Debug [security] INSTALL_LOCK = true SECRET_KEY = 9pCviYTWSb -INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ +INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ \ No newline at end of file diff --git a/integrations/sqlite.ini.tmpl b/integrations/sqlite.ini.tmpl index 5d54c5f9fa..4c0d40cc4a 100644 --- a/integrations/sqlite.ini.tmpl +++ b/integrations/sqlite.ini.tmpl @@ -13,6 +13,9 @@ REPO_INDEXER_PATH = integrations/indexers-sqlite/repos.bleve [queue.code_indexer] TYPE = immediate +[queue.push_update] +TYPE = immediate + [repository] ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-sqlite/gitea-repositories -- cgit v1.2.3