如何在 Hangfire.io 中添加替代 CoreBackgroundJobPerformer 的额外作业参数
How to add additional job params that are substituted to CoreBackgroundJobPerformer in Hangfire.io
在优秀的hangfire.io图书馆jobs can be executed with special params that are substituted at job execution such as IJobCancellationToken which allows you to cancel a job. Similarly PerformContext can be added as a param at runtime. This functionality is implemented in the CoreBackgroundJobPerformer
如何添加我自己的自定义替换,以便除了内置参数替换之外,我还可以更改替换行为以在作业执行时替换我自己的参数?
AFAIK 我需要实现一个由自定义 BackgroundJobServer 创建的自定义 IBackgroundJobPerformer。但是有没有更简单的方法呢?
似乎没有一种简单的方法可以做到这一点,可能需要对 hangfire 或 运行 一个分叉版本进行一些更改。关于如何实施的进一步讨论在 https://github.com/HangfireIO/Hangfire/issues/1221
在优秀的hangfire.io图书馆jobs can be executed with special params that are substituted at job execution such as IJobCancellationToken which allows you to cancel a job. Similarly PerformContext can be added as a param at runtime. This functionality is implemented in the CoreBackgroundJobPerformer
如何添加我自己的自定义替换,以便除了内置参数替换之外,我还可以更改替换行为以在作业执行时替换我自己的参数?
AFAIK 我需要实现一个由自定义 BackgroundJobServer 创建的自定义 IBackgroundJobPerformer。但是有没有更简单的方法呢?
似乎没有一种简单的方法可以做到这一点,可能需要对 hangfire 或 运行 一个分叉版本进行一些更改。关于如何实施的进一步讨论在 https://github.com/HangfireIO/Hangfire/issues/1221