Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No tags populated #214

Open
donnytian opened this issue May 17, 2024 · 1 comment
Open

No tags populated #214

donnytian opened this issue May 17, 2024 · 1 comment

Comments

@donnytian
Copy link

Followed the steps in the wiki to use HttpJob along with Tags, and observed that tags are not populated for JobAgent.

services.AddHangfire(config => config
  .UseSqlServerStorage(...)
  .UseConsole(...)
  .UseHangfireHttpJob(...)
  .UseTagsWithSql(...);

By checking the CodingUtil.IsTagServiceInstalled it returns false, it's a static file and was initialized earlier than expected.

The workaround is to add Tags before the HttpJob:

services.AddHangfire(config => config
  .UseSqlServerStorage(...)
  .UseConsole(...)
  // Add Tags before HttpJob, otherwise HttpJob won't generate tags for its jobs.
  .UseTagsWithSql(...)
  .UseHangfireHttpJob(...);

To fix this issue, change CodingUtil.IsTagServiceInstalled a property should be fine.

@yuzd
Copy link
Owner

yuzd commented Aug 27, 2024

thank you ,
i will fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants