Use immediate queues in integration tests and ensure that immediate (#16927)

queue type is also used for unique queues.

Signed-off-by: Andrew Thornton <art27@cantab.net>
tokarchuk/v1.17
zeripath 3 years ago committed by GitHub
parent 219dec030d
commit 6c125e9797
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      integrations/mssql.ini.tmpl
  2. 3
      integrations/mysql.ini.tmpl
  3. 3
      integrations/mysql8.ini.tmpl
  4. 3
      integrations/pgsql.ini.tmpl
  5. 3
      integrations/sqlite.ini.tmpl
  6. 2
      modules/queue/setting.go

@ -15,6 +15,9 @@ ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-mssql/indexers/issues.q
REPO_INDEXER_ENABLED = true REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = integrations/gitea-integration-mssql/indexers/repos.bleve REPO_INDEXER_PATH = integrations/gitea-integration-mssql/indexers/repos.bleve
[queue]
TYPE = immediate
[queue.code_indexer] [queue.code_indexer]
TYPE = immediate TYPE = immediate

@ -16,6 +16,9 @@ ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-mysql/indexers/issues.q
REPO_INDEXER_ENABLED = true REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = integrations/gitea-integration-mysql/indexers/repos.bleve REPO_INDEXER_PATH = integrations/gitea-integration-mysql/indexers/repos.bleve
[queue]
TYPE = immediate
[queue.code_indexer] [queue.code_indexer]
TYPE = immediate TYPE = immediate

@ -15,6 +15,9 @@ ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-mysql8/indexers/issues.
REPO_INDEXER_ENABLED = true REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = integrations/gitea-integration-mysql8/indexers/repos.bleve REPO_INDEXER_PATH = integrations/gitea-integration-mysql8/indexers/repos.bleve
[queue]
TYPE = immediate
[queue.code_indexer] [queue.code_indexer]
TYPE = immediate TYPE = immediate

@ -16,6 +16,9 @@ ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-pgsql/indexers/issues.q
REPO_INDEXER_ENABLED = true REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = integrations/gitea-integration-pgsql/indexers/repos.bleve REPO_INDEXER_PATH = integrations/gitea-integration-pgsql/indexers/repos.bleve
[queue]
TYPE = immediate
[queue.code_indexer] [queue.code_indexer]
TYPE = immediate TYPE = immediate

@ -11,6 +11,9 @@ ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-sqlite/indexers/issues.
REPO_INDEXER_ENABLED = true REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = integrations/gitea-integration-sqlite/indexers/repos.bleve REPO_INDEXER_PATH = integrations/gitea-integration-sqlite/indexers/repos.bleve
[queue]
TYPE = immediate
[queue.code_indexer] [queue.code_indexer]
TYPE = immediate TYPE = immediate

@ -75,7 +75,7 @@ func CreateUniqueQueue(name string, handle HandlerFunc, exemplar interface{}) Un
return nil return nil
} }
if len(q.Type) > 0 && q.Type != "dummy" && !strings.HasPrefix(q.Type, "unique-") { if len(q.Type) > 0 && q.Type != "dummy" && q.Type != "immediate" && !strings.HasPrefix(q.Type, "unique-") {
q.Type = "unique-" + q.Type q.Type = "unique-" + q.Type
} }

Loading…
Cancel
Save