Skip to content

Commit

Permalink
finish JobsConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
jdmcd committed Feb 5, 2019
1 parent 3840928 commit 25bfcec
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Sources/Jobs/JobsConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import Vapor
/// A `Service` to configure `Job`s
public struct JobsConfig: Service {

/// Decoder type
internal typealias JobTypeDecoder = (Decoder) throws -> JobData

/// Type storage
internal var storage: [String: AnyJob]

Expand All @@ -19,8 +16,8 @@ public struct JobsConfig: Service {
/// This must be called on all `Job` objects before they can be run in a queue.
///
/// - Parameter job: The `Job` to add.
mutating public func add(_ job: AnyJob) {
storage[String(describing: job)] = job
mutating public func add<J: Job>(_ job: J) {
storage[String(describing: J.Data.self)] = job
}


Expand Down

0 comments on commit 25bfcec

Please sign in to comment.