Browse Source

Update Hangfire document

pull/16090/head
liangshiwei 4 years ago
parent
commit
e460121b3d
  1. 2
      docs/en/Background-Jobs-Hangfire.md
  2. 2
      docs/en/Background-Workers-Hangfire.md
  3. 2
      docs/zh-Hans/Background-Jobs-Hangfire.md
  4. 2
      docs/zh-Hans/Background-Workers-Hangfire.md

2
docs/en/Background-Jobs-Hangfire.md

@ -66,6 +66,8 @@ After you have installed these NuGet packages, you need to configure your projec
} }
```` ````
> You have to configure a storage for Hangfire.
2. If you want to use hangfire's dashboard, you can add `UseHangfireDashboard` call in the `OnApplicationInitialization` method in `Module` class 2. If you want to use hangfire's dashboard, you can add `UseHangfireDashboard` call in the `OnApplicationInitialization` method in `Module` class
````csharp ````csharp

2
docs/en/Background-Workers-Hangfire.md

@ -40,6 +40,8 @@ public class YourModule : AbpModule
> Hangfire background worker integration provides an adapter `HangfirePeriodicBackgroundWorkerAdapter` to automatically load any `PeriodicBackgroundWorkerBase` and `AsyncPeriodicBackgroundWorkerBase` derived classes as `IHangfireBackgroundWorker` instances. This allows you to still to easily switch over to use Hangfire as the background manager even you have existing background workers that are based on the [default background workers implementation](Background-Workers.md). > Hangfire background worker integration provides an adapter `HangfirePeriodicBackgroundWorkerAdapter` to automatically load any `PeriodicBackgroundWorkerBase` and `AsyncPeriodicBackgroundWorkerBase` derived classes as `IHangfireBackgroundWorker` instances. This allows you to still to easily switch over to use Hangfire as the background manager even you have existing background workers that are based on the [default background workers implementation](Background-Workers.md).
> You have to configure a storage for Hangfire.
## Create a Background Worker ## Create a Background Worker
`HangfireBackgroundWorkerBase` is an easy way to create a background worker. `HangfireBackgroundWorkerBase` is an easy way to create a background worker.

2
docs/zh-Hans/Background-Jobs-Hangfire.md

@ -66,6 +66,8 @@ public class YourModule : AbpModule
} }
```` ````
> 你必须为Hangfire配置一个存储
### 指定队列 ### 指定队列
你可以使用 [`QueueAttribute`](https://docs.hangfire.io/en/latest/background-processing/configuring-queues.html) 来指定队列. 你可以使用 [`QueueAttribute`](https://docs.hangfire.io/en/latest/background-processing/configuring-queues.html) 来指定队列.

2
docs/zh-Hans/Background-Workers-Hangfire.md

@ -41,6 +41,8 @@ public class YourModule : AbpModule
> Hangfire后台工作者集成提供了 `HangfirePeriodicBackgroundWorkerAdapter` 来适配 `PeriodicBackgroundWorkerBase` 和 `AsyncPeriodicBackgroundWorkerBase` 派生类. 所以你依然可以按照[后台工作者文档](Background-Workers.md)来定义后台作业. > Hangfire后台工作者集成提供了 `HangfirePeriodicBackgroundWorkerAdapter` 来适配 `PeriodicBackgroundWorkerBase` 和 `AsyncPeriodicBackgroundWorkerBase` 派生类. 所以你依然可以按照[后台工作者文档](Background-Workers.md)来定义后台作业.
> 你必须为Hangfire配置一个存储
## 创建后台工作者 ## 创建后台工作者
`HangfireBackgroundWorkerBase` 是创建一个后台工作者简单的方法. `HangfireBackgroundWorkerBase` 是创建一个后台工作者简单的方法.

Loading…
Cancel
Save