queues-mongo-driver

1.0.3

A MongoDB implementation for https://github.com/vapor/queues
vapor-community/queues-mongo-driver

What's New

Actually fix the queue bug for real this time.

2021-01-23T18:28:52Z

Adds back sorting on ascending created date (oldest jobs first) and updates the created date if the job can't be marked as finished, pushing it to the back of the queue.

QueuesMongoDriver

A MongoDB driver for Vapor Queues

Getting Started

To install queues-mongo-driver add the following dependency to your Package.swift:

.package(url: "https://github.com/vapor-community/queues-mongo-driver.git", from: "1.0.0"),

This driver depends on MongoKitten so to configure the driver we need an instance of a MongoDatabase. Ideally during app startup or in your configure.swift:

import QueuesMongoDriver
import MongoKitten

func configure(app: Application) throws {
  let mongoDatabase = try MongoDatabase.lazyConnect("mongodb://localhost:27017/my-database", on: app.eventLoopGroup.next())
  
  // Setup Indexes for the Job Schema for performance (Optional)
  try app.queues.setupMongo(using: mongoDatabase)
  app.queues.use(.mongodb(mongoDatabase))
}

Description

  • Swift Tools 5.2.0
View More Packages from this Author

Dependencies

Last updated: Sun Apr 14 2024 22:28:46 GMT-0900 (Hawaii-Aleutian Daylight Time)