Hi,
I would like to know, if I can use e.g. JobStorageTransaction.AddToSet to persist custom data in the Hangfire database. If so, is there a best practice how to name the keys, so that name conflicts are avoided?
My use case: I am using Hangfire to automate a third party application, which needs to be restarted after a certain amount of times the app has been automated by my Hangfire job (not a Timespan). So I have to keep track of the usage for this machine only (multiple Servers exist).
I am planning to use IncrementCount (only if I can reset or delete it) or a simple key value entry:
Key="custom:ThirdPartyAppUsageCount{machinename}", value=counter
May I use the built-in Hangfire tables for this or do I need to persist this in an additional data source?
Robin
Hi,
I would like to know, if I can use e.g. JobStorageTransaction.AddToSet to persist custom data in the Hangfire database. If so, is there a best practice how to name the keys, so that name conflicts are avoided?
My use case: I am using Hangfire to automate a third party application, which needs to be restarted after a certain amount of times the app has been automated by my Hangfire job (not a Timespan). So I have to keep track of the usage for this machine only (multiple Servers exist).
I am planning to use IncrementCount (only if I can reset or delete it) or a simple key value entry:
Key="custom:ThirdPartyAppUsageCount{machinename}", value=counter
May I use the built-in Hangfire tables for this or do I need to persist this in an additional data source?
Robin