Swiftpack.co - Package - vapor/jobs

Github

link
Stars: 81
Help us keep the lights on

Dependencies

Releases

1.0.0-beta.2.1.0 - Nov 13, 2019

Adds a new .at() API on ScheduledJob for one-off jobs with a specific date

1.0.0-beta.2.0.0 - Nov 9, 2019

Breaking Changes:

Dispatching jobs is now more type safe:

app.get("foo") { req in
    return req.jobs.dispatch(FooJob.self, .init(foo: "bar"))
        .map { "done" }
}

1.0.0-beta.1.0.2 - Nov 9, 2019

New registration API (#43):

let app = Application(environment: env)
app.provider(JobsProvider())

app.jobs.driver(TestDriver())
app.jobs.add(FooJob())
app.jobs.add(BarJob())
app.jobs.add(QuxJob())

1.0.0-beta.1.0.1 - Nov 1, 2019

Quick patch to fix a delayUntil bug (#42)

1.0.0-beta.1 - Oct 25, 2019

  • Update to Vapor Beta 1
  • You can now access the jobs worker via req.jobs
  • The new configuration setup looks like this:
let app = Application(environment: env)
app.provider(JobsProvider())
app.register(JobsDriver.self) { app in
    return TestDriver(on: app.make())
}
app.register(extension: JobsConfiguration.self) { jobs, app in
    jobs.add(FooJob())
}
return app
  • Added a new queuedAt property to the JobStorage object
  • Added informational dispatch log