/// <summary>
 ///     Tells the bootstrapper to use PostgreSQL as a job storage
 ///     with the given options, that can be accessed using the specified
 ///     connection string or its name.
 /// </summary>
 /// <param name="configuration">Configuration</param>
 /// <param name="nameOrConnectionString">Connection string or its name</param>
 /// <param name="options">Advanced options</param>
 public static IGlobalConfiguration <PostgreSqlStorage> UsePostgreSqlStorage(
     this IGlobalConfiguration configuration,
     string nameOrConnectionString,
     PostgreSqlStorageOptions options)
 {
     return(configuration.UsePostgreSqlStorage(nameOrConnectionString, null, options));
 }
 /// <summary>
 ///     Tells the bootstrapper to use PostgreSQL as a job storage,
 ///     that can be accessed using the given connection string or
 ///     its name.
 /// </summary>
 /// <param name="configuration">Configuration</param>
 /// <param name="nameOrConnectionString">Connection string or its name</param>
 public static IGlobalConfiguration <PostgreSqlStorage> UsePostgreSqlStorage(
     this IGlobalConfiguration configuration,
     string nameOrConnectionString)
 {
     DapperNodaTimeHelpers.AddDapperNodaTime();
     return(configuration.UsePostgreSqlStorage(nameOrConnectionString, null, new PostgreSqlStorageOptions()));
 }
Example #3
0
 public void ConfigureHangfireBuilder(IGlobalConfiguration builder)
 {
     if (_Type == DatabaseType.Sqlite)
     {
         builder.UseMemoryStorage();                 //Sql provider does not support multiple workers
     }
     else if (_Type == DatabaseType.Postgres)
     {
         builder.UsePostgreSqlStorage(_ConnectionString);
     }
 }
Example #4
0
 public static void ConfigureHangfireWithPostgresStorage(
     this IGlobalConfiguration configuration,
     string connectionString)
 {
     configuration.UsePostgreSqlStorage(connectionString);
 }