public void InitDB() { string dbPath = Path.Combine (Path.GetTempPath (), "TestDB"); if (Directory.Exists (dbPath)) { Directory.Delete (dbPath, true); } storage = new CouchbaseStorage (dbPath, "test-db"); db = storage.Database; }
public FetchedJob(CouchbaseStorage storage, Documents.Queue data) { bucket = storage.Client.OpenBucket(storage.Options.DefaultBucket); Id = data.Id; JobId = data.JobId; TimeSpan keepAliveInterval = TimeSpan.FromMinutes(5); timer = new Timer(KeepAliveJobCallback, null, keepAliveInterval, keepAliveInterval); }
public void InitDB() { string dbPath = Path.Combine (Path.GetTempPath (), Path.GetRandomFileName ()); if (Directory.Exists (dbPath)) { Directory.Delete (dbPath, true); } try { storage = new CouchbaseStorageLongoMatch (dbPath, "test-db"); } catch (Exception ex) { throw ex; } db = storage.Database; }
public void InitDB() { string dbPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); if (Directory.Exists(dbPath)) { Directory.Delete(dbPath, true); } try { storage = new CouchbaseStorageLongoMatch(dbPath, "test-db"); } catch (Exception ex) { throw ex; } db = storage.Database; }
public void InitDB() { string dbPath = Path.Combine(Path.GetTempPath(), "TestDB"); if (Directory.Exists(dbPath)) { Directory.Delete(dbPath, true); } try { storage = new DummyCouchbaseStorage(dbPath, "test-db"); } catch (Exception ex) { throw ex; } db = storage.Database; }
/// <summary> /// Enables to attach Couchbase to Hangfire /// </summary> /// <param name="global">The IGlobalConfiguration object</param> /// <param name="sectionName">The xml configuration section name</param> /// <param name="defaultBucket">The default name of the bucket to use</param> /// <param name="options">The CouchbaseStorageOptions object to override any of the options</param> /// <returns></returns> public static IGlobalConfiguration <CouchbaseStorage> UseCouchbaseStorage(this IGlobalConfiguration global, string sectionName, string defaultBucket = "default", CouchbaseStorageOptions options = null) { if (global == null) { throw new ArgumentNullException(nameof(global)); } if (string.IsNullOrEmpty(sectionName)) { throw new ArgumentNullException(nameof(sectionName)); } if (string.IsNullOrEmpty(defaultBucket)) { throw new ArgumentNullException(nameof(defaultBucket)); } CouchbaseStorage storage = new CouchbaseStorage(sectionName, defaultBucket, options); return(global.UseStorage(storage)); }
public TestView(CouchbaseStorage storage) : base(storage) { }
public TeamsView(CouchbaseStorage storage) : base(storage) { DocumentType = "Team"; }
public JobQueue(CouchbaseStorage storage) { this.storage = storage; defaultLockTimeout = TimeSpan.FromSeconds(15) + storage.Options.QueuePollInterval; }
public PlayersView(CouchbaseStorage storage) : base(storage) { DocumentType = "Player"; }
public EventTypeView(CouchbaseStorage storage) : base(storage) { DocumentType = "EventType"; }
public DashboardsView(CouchbaseStorage storage) : base(storage) { DocumentType = "Dashboard"; }
public TimelineEventsView(CouchbaseStorage storage) : base(storage) { }
public StorableView(CouchbaseStorage storage) : base(storage) { }
public JobQueueProvider(CouchbaseStorage storage) { queue = new JobQueue(storage); monitoringQueue = new JobQueueMonitoringApi(storage); }
public PlaylistView(CouchbaseStorage storage) : base(storage) { DocumentType = "Playlist"; }
public StorableImageTestView(CouchbaseStorage storage) : base(storage) { }
public ProjectsView(CouchbaseStorage storage) : base(storage) { DocumentType = "Project"; }
protected GenericView(CouchbaseStorage storage) : base(storage) { }
public JobQueueMonitoringApi(CouchbaseStorage storage) => this.storage = storage;