Skip to content

Commit

Permalink
Make AsyncScheduledJob public so clients can conform to it (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
iKenndac committed Oct 27, 2021
1 parent bdb4171 commit 58b2d78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Queues/AsyncScheduledJob.swift
Expand Up @@ -5,7 +5,7 @@ import Foundation
#if compiler(>=5.5) && canImport(_Concurrency)
/// Describes a job that can be scheduled and repeated
@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
protocol AsyncScheduledJob: ScheduledJob {
public protocol AsyncScheduledJob: ScheduledJob {
var name: String { get }

/// The method called when the job is run
Expand All @@ -17,7 +17,7 @@ protocol AsyncScheduledJob: ScheduledJob {
extension AsyncScheduledJob {
public var name: String { "\(Self.self)" }

func run(context: QueueContext) -> EventLoopFuture<Void> {
public func run(context: QueueContext) -> EventLoopFuture<Void> {
let promise = context.eventLoop.makePromise(of: Void.self)
promise.completeWithTask {
try await self.run(context: context)
Expand Down

0 comments on commit 58b2d78

Please sign in to comment.