Fernwood
Una cola de tareas en segundo plano, pequeña y rápida, para servidores Swift. Tareas persistentes en SQLite o Postgres, reintentos con espera exponencial y un panel que de verdad se entiende.
Consejo
¿Recién llegas? Con la guía de inicio tendrás un worker funcionando en cinco minutos.
Instalación
Añade Fernwood a tu Package.swift:
.package(url: "https://example.com/fernwood.git", from: "2.4.0")
Uso
import Fernwood
struct SendReceipt: Job {
let orderID: UUID
func run(context: JobContext) async throws {
let order = try await context.db.order(orderID)
try await Mailer.send(.receipt(for: order))
}
}
try await queue.enqueue(SendReceipt(orderID: order.id), delay: .seconds(30))
Por qué Fernwood
| Fernwood | Cron + scripts | Cola en la nube | |
|---|---|---|---|
| Sobrevive a reinicios | ✅ | ❌ | ✅ |
| Reintentos con espera | ✅ | ❌ | ✅ |
| Usa tu propia base de datos | ✅ | ✅ | ❌ |
| Factura mensual | US$0 | US$0 | 💸 |
Funciones
- Entrega al menos una vez, con claves de idempotencia
- Espera exponencial con variación aleatoria
- Tareas recurrentes al estilo cron
- Carriles de prioridad (previsto para la 2.5)
Licencia
MIT. Consulta LICENSE.








