示例#1
0
        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);
        }
示例#2
0
        private static string GeneratePreCacheKey(string objectName)
        {
            var appKey = AppSettingHelper.GetAppSetting(typeof(string), "CacheName", true);

            return("human-resource-app:{0}:{1}:".FormatWith(appKey, objectName).ToLower());
        }