Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 571 Bytes

Readme.md

File metadata and controls

22 lines (18 loc) · 571 Bytes

Logo

Learning stuffs

Author [Tony Truong]

To do -Successed job delete after 1 day - need to extend -Log with log4net or NLog

Hangfire DB cleanup

TRUNCATE TABLE [HangFire].[AggregatedCounter]
TRUNCATE TABLE [HangFire].[Counter]
TRUNCATE TABLE [HangFire].[JobParameter]
TRUNCATE TABLE [HangFire].[JobQueue]
TRUNCATE TABLE [HangFire].[List]
TRUNCATE TABLE [HangFire].[State]
DELETE FROM [HangFire].[Job]
DBCC CHECKIDENT ('[HangFire].[Job]', reseed, 0)
UPDATE [HangFire].[Hash] SET Value = 1 WHERE Field = 'LastJobId'