abp icon indicating copy to clipboard operation
abp copied to clipboard

backgroundworker-hangfire

Open zhuxingke opened this issue 11 months ago • 3 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Description

In the development environment, repeatedly starting the service causes Hangfire initialization to hang, leading to service startup failure. In the Service, I injected the background worker with dependency injection:

Reproduction Steps

No response

Expected behavior

No response

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

9.0.0

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

zhuxingke avatar Mar 05 '25 02:03 zhuxingke

In the Service, I injected the background worker with dependency injection:

await _notificationWorker.StopAsync();

// Modify the scheduled task expression _notificationWorker.CronExpression = Cron.Weekly((System.DayOfWeek)input.Weekly, input.SendTime.Hours, input.SendTime.Minutes);

// Restart the worker await _notificationWorker.StartAsync(); When changing the execution time as above, it works fine the first time, but subsequent attempts result in a StoppingTokenSource error.

zhuxingke avatar Mar 05 '25 02:03 zhuxingke

hi

  • Reproduction Steps

maliming avatar Mar 05 '25 03:03 maliming

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 06 '25 03:05 stale[bot]