i18n - docs translations (#17434)
Created by Github action Co-authored-by: github-actions <github-actions@twenty.com>
This commit is contained in:
committed by
GitHub
parent
2353bc62cc
commit
e0d4492013
+10
-10
@@ -1,20 +1,20 @@
|
||||
---
|
||||
title: Message Queue
|
||||
title: 消息队列
|
||||
---
|
||||
|
||||
Queues facilitate async operations to be performed. They can be used for performing background tasks such as sending a welcome email on register.
|
||||
Each use case will have its own queue class extended from `MessageQueueServiceBase`.
|
||||
队列支持异步操作的执行。 它们可用于执行后台任务,例如在注册时发送欢迎邮件。
|
||||
每个用例都将拥有一个继承自 `MessageQueueServiceBase` 的队列类。
|
||||
|
||||
Currently, we only support `bull-mq`[bull-mq](https://bullmq.io/) as the queue driver.
|
||||
当前,我们仅支持使用 `bull-mq`[bull-mq](https://bullmq.io/) 作为队列驱动。
|
||||
|
||||
## Steps to create and use a new queue
|
||||
## 创建和使用新队列的步骤
|
||||
|
||||
1. Add a queue name for your new queue under enum `MESSAGE_QUEUES`.
|
||||
2. Provide the factory implementation of the queue with the queue name as the dependency token.
|
||||
3. Inject the queue that you created in the required module/service with the queue name as the dependency token.
|
||||
4. Add worker class with token based injection just like producer.
|
||||
1. 在枚举 `MESSAGE_QUEUES` 下为您的新队列添加队列名称。
|
||||
2. 提供以队列名称为依赖令牌的队列工厂实现。
|
||||
3. 在所需模块/服务中以队列名称作为依赖令牌注入您创建的队列。
|
||||
4. 添加与生产者相同令牌注入的工作类。
|
||||
|
||||
### Example usage
|
||||
### 示例用法
|
||||
|
||||
```ts
|
||||
class Resolver {
|
||||
|
||||
Reference in New Issue
Block a user