Skip to content

Commit

Permalink
Merge pull request #16 from hummingbird-project/project-template-updates
Browse files Browse the repository at this point in the history
Project template updates
  • Loading branch information
adam-fowler committed Mar 8, 2024
2 parents c5feabb + 529d833 commit 82e541b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/api-breakage.yml
Expand Up @@ -3,8 +3,6 @@ name: API breaking changes

on:
pull_request:
branches:
- main

jobs:
linux:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Expand Up @@ -4,14 +4,10 @@ on:
push:
branches:
- main
- 2.x.x
paths:
- '**.swift'
- '**.yml'
pull_request:
branches:
- main
- 2.x.x
workflow_dispatch:

jobs:
Expand All @@ -20,9 +16,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
image:
- 'swift:5.9'
- 'swiftlang/swift:nightly-5.10-jammy'
image: ["swift:5.9", "swift:5.10", "swiftlang/swift:nightly-jammy"]
services:
redis:
image: redis
Expand All @@ -49,6 +43,6 @@ jobs:
-ignore-filename-regex="\/Benchmarks\/" \
-instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: info.lcov
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Expand Up @@ -27,4 +27,4 @@ jobs:
uses: actions/checkout@v4
- name: Test
run: |
swift test --enable-test-discovery
swift test
3 changes: 0 additions & 3 deletions .github/workflows/validate.yml
Expand Up @@ -2,9 +2,6 @@ name: Validity Check

on:
pull_request:
branches:
- main
- 2.x.x

jobs:
validate:
Expand Down
4 changes: 1 addition & 3 deletions Sources/HummingbirdJobsRedis/Configuration.swift
Expand Up @@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//

import NIOCore
import RediStack
@preconcurrency import RediStack

extension HBRedisQueue {
/// what to do with failed/processing jobs from last time queue was handled
Expand Down Expand Up @@ -50,5 +50,3 @@ extension HBRedisQueue {
}
}
}

extension RedisKey: @unchecked Sendable {}
8 changes: 7 additions & 1 deletion Sources/HummingbirdJobsRedis/RedisJobQueue.swift
Expand Up @@ -201,6 +201,7 @@ public final class HBRedisQueue: HBJobQueueDriver {

/// extend HBRedisJobQueue to conform to AsyncSequence
extension HBRedisQueue {
public typealias Element = HBQueuedJob<JobID>
public struct AsyncIterator: AsyncIteratorProtocol {
let queue: HBRedisQueue

Expand Down Expand Up @@ -235,7 +236,12 @@ extension HBJobQueueDriver where Self == HBRedisQueue {

// Extend ByteBuffer so that is conforms to `RESPValueConvertible`. Really not sure why
// this isnt available already
extension ByteBuffer: RESPValueConvertible {
#if compiler(>=6.0)
extension ByteBuffer: @retroactive RESPValueConvertible {}
#else
extension ByteBuffer: RESPValueConvertible {}
#endif
extension ByteBuffer {
public init?(fromRESP value: RESPValue) {
guard let buffer = value.byteBuffer else { return nil }
self = buffer
Expand Down

0 comments on commit 82e541b

Please sign in to comment.