0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 15:23:14 -05:00

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>
This commit is contained in:
zeripath 2021-09-03 11:20:57 +01:00 committed by GitHub
parent 219dec030d
commit 6c125e9797
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 1 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -75,7 +75,7 @@ func CreateUniqueQueue(name string, handle HandlerFunc, exemplar interface{}) Un
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
}