Skip to content

Releases: vapor/queues

Bail early if no scheduled jobs exist

24 Jan 02:41
d913166
Compare
Choose a tag to compare
Pre-release

If no scheduled jobs exist, fail early from the process to avoid running the worker unnecessarily.

Fix everySecond bug

24 Jan 02:31
64f9946
Compare
Choose a tag to compare
Fix everySecond bug Pre-release
Pre-release

This update fixes a bug that caused everySecond() not to fire when running scheduled jobs.

Support for In-Process workers

04 Jan 17:26
77cc497
Compare
Choose a tag to compare
Pre-release

Jobs can now run as an in-process worker instead of a separate worker side-by-side with the main application:

try JobsCommand(application: app, scheduled: false).startJobs(on: .default)

Or:

try JobsCommand(application: app, scheduled: true).startScheduledJobs()

Jobs 1.0.0 Beta 3

09 Dec 21:37
d0cdfad
Compare
Choose a tag to compare
Jobs 1.0.0 Beta 3 Pre-release
Pre-release
  • Updated to latest Vapor beta 2 release (#48)
import Jobs
import Vapor

let email = Email()
app.jobs.add(email)

try app.jobs.use(.redis(url: "redis://\(hostname):6379"))

app.get("send-email") { req in
    req.jobs.dispatch(Email.self, .init(to: "tanner@vapor.codes"))
        .map { HTTPStatus.ok }
}
  • Enabled test discovery on Linux. (#49)

Beta 2.1.0

13 Nov 16:17
Compare
Choose a tag to compare
Beta 2.1.0 Pre-release
Pre-release

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

Beta 2.0.0

09 Nov 17:07
Compare
Choose a tag to compare
Beta 2.0.0 Pre-release
Pre-release

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" }
}

Beta 1.0.2

09 Nov 13:26
Compare
Choose a tag to compare
Beta 1.0.2 Pre-release
Pre-release

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())

Beta 1.0.1

01 Nov 12:38
Compare
Choose a tag to compare
Beta 1.0.1 Pre-release
Pre-release

Quick patch to fix a delayUntil bug (#42)

Beta 1

25 Oct 12:11
e3b19f1
Compare
Choose a tag to compare
Beta 1 Pre-release
Pre-release
  • 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

Scheduled Jobs

08 Aug 22:02
e87c836
Compare
Choose a tag to compare
Scheduled Jobs Pre-release
Pre-release

New:

  • Vapor Jobs now has scheduled jobs