Inheritance: JobStorage
        public ExpirationManager(SQLiteStorage storage, TimeSpan checkInterval)
        {
            if (storage == null) throw new ArgumentNullException("storage");

            _storage = storage;
            _checkInterval = checkInterval;
        }
Example #2
0
        public SQLiteFetchedJob(
            [NotNull] SQLiteStorage storage,
            int id,
            string jobId,
            string queue)
        {
            if (storage == null)
            {
                throw new ArgumentNullException(nameof(storage));
            }
            if (jobId == null)
            {
                throw new ArgumentNullException(nameof(jobId));
            }
            if (queue == null)
            {
                throw new ArgumentNullException(nameof(queue));
            }

            _storage = storage;

            Id    = id;
            JobId = jobId;
            Queue = queue;
        }
Example #3
0
 public SQLiteJobQueueMonitoringApi([NotNull] SQLiteStorage storage)
 {
     if (storage == null)
     {
         throw new ArgumentNullException("storage");
     }
     _storage = storage;
 }
Example #4
0
 public SQLiteStorageConnection([NotNull] SQLiteStorage storage)
 {
     if (storage == null)
     {
         throw new ArgumentNullException("storage");
     }
     _storage = storage;
 }
        public SQLiteJobQueue([NotNull] SQLiteStorage storage, SQLiteStorageOptions options)
        {
            if (storage == null) throw new ArgumentNullException("storage");
            if (options == null) throw new ArgumentNullException("options");

            _storage = storage;
            _options = options;
        }
        public SQLiteWriteOnlyTransaction([NotNull] SQLiteStorage storage)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }

            _storage = storage;
        }
Example #7
0
 static void Main(string[] args)
 {
     var storage = new SQLiteStorage(@"Data Source=c:\mydb.db;Version=3;");
     using (new BackgroundJobServer())
     {
         Console.WriteLine("Hangfire Server started. Press ENTER to exit...");
         Console.ReadLine();
     }
 }
Example #8
0
        public SQLiteMonitoringApi([NotNull] SQLiteStorage storage, int?jobListLimit)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }

            _storage      = storage;
            _jobListLimit = jobListLimit;
        }
        public static IGlobalConfiguration<SQLiteStorage> UseSQLiteStorage(
            [NotNull] this IGlobalConfiguration configuration,
            [NotNull] string nameOrConnectionString)
        {
            if (configuration == null) throw new ArgumentNullException("configuration");
            if (nameOrConnectionString == null) throw new ArgumentNullException("nameOrConnectionString");

            var storage = new SQLiteStorage(nameOrConnectionString);
            return configuration.UseStorage(storage);
        }
Example #10
0
        public ExpirationManager(SQLiteStorage storage, TimeSpan checkInterval)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }

            _storage       = storage;
            _checkInterval = checkInterval;
        }
Example #11
0
        public SQLiteJobQueue([NotNull] SQLiteStorage storage, SQLiteStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _storage = storage;
            _options = options;
        }
        public SQLiteJobQueueProvider([NotNull] SQLiteStorage storage, [NotNull] SQLiteStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _jobQueue      = new SQLiteJobQueue(storage, options);
            _monitoringApi = new SQLiteJobQueueMonitoringApi(storage);
        }
        public SQLiteFetchedJob(
            [NotNull] SQLiteStorage storage,
            int id,           
            string jobId,
            string queue)
        {
            if (storage == null) throw new ArgumentNullException("storage");
            if (jobId == null) throw new ArgumentNullException("jobId");
            if (queue == null) throw new ArgumentNullException("queue");

            _storage = storage;

            Id = id;
            JobId = jobId;
            Queue = queue;
        }
Example #14
0
        public static IGlobalConfiguration <SQLiteStorage> UseSQLiteStorage(
            [NotNull] this IGlobalConfiguration configuration,
            [NotNull] string nameOrConnectionString)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }
            if (nameOrConnectionString == null)
            {
                throw new ArgumentNullException("nameOrConnectionString");
            }

            var storage = new SQLiteStorage(nameOrConnectionString);

            return(configuration.UseStorage(storage));
        }
Example #15
0
 public ExpirationManager(SQLiteStorage storage)
     : this(storage, TimeSpan.FromHours(1))
 {
 }
 public ExpirationManager(SQLiteStorage storage)
     : this(storage, TimeSpan.FromHours(1))
 {
 }
 public SQLiteStorageConnection([NotNull] SQLiteStorage storage)
 {
     if (storage == null) throw new ArgumentNullException("storage");
     _storage = storage;
 }