diff --git a/Sources/MongoQueue/MongoQueue.swift b/Sources/MongoQueue/MongoQueue.swift index 6c8f6e5..5f5d4a0 100644 --- a/Sources/MongoQueue/MongoQueue.swift +++ b/Sources/MongoQueue/MongoQueue.swift @@ -25,6 +25,16 @@ import Meow /// try await queue.queueTask(Reminder(username: "Joannis")) /// ``` public final class MongoQueue { + public struct Option: Hashable { + internal enum _Option: Hashable { + case uniqueKeysEnabled + } + + internal let raw: _Option + + public static let enableUniqueKeys = Option(raw: .uniqueKeysEnabled) + } + internal let collection: MongoCollection internal let logger = Logger(label: "org.openkitten.mongo-queues") private var knownTypes = [KnownType]() @@ -33,13 +43,20 @@ public final class MongoQueue { private var maxParallelJobs = 1 private var task: Task? public var newTaskPollingFrequency = NIO.TimeAmount.milliseconds(1000) + public let options: Set