private static void RegisterHangfireTasks(StandardKernel kernel) { string hangfireDBName = AppSettingHelper.GetAppSetting <string>(Constants.AppSetting.HangfireDBName); JobStorage.Current = new MongoStorage("mongodb://localhost", hangfireDBName); HangfireGlobalConfiguration.Configuration.UseNinjectActivator(kernel); MoveExpiredJobs(kernel); SyncClientData(kernel); SyncClientAvatars(kernel); }
private static string GeneratePreCacheKey(string objectName) { var appKey = AppSettingHelper.GetAppSetting(typeof(string), "CacheName", true); return("human-resource-app:{0}:{1}:".FormatWith(appKey, objectName).ToLower()); }