feat: Commit due to moving to nas
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,3 +9,4 @@ DerivedData/
|
||||
.topics
|
||||
mqtt_password.txt
|
||||
.env
|
||||
.smbdelete*
|
||||
|
||||
4
Makefile
4
Makefile
@@ -10,6 +10,9 @@ bootstrap: bootstrap-env bootstrap-topics
|
||||
build:
|
||||
@swift build
|
||||
|
||||
clean:
|
||||
rm -rf .build
|
||||
|
||||
run:
|
||||
@swift run dewPoint-controller
|
||||
|
||||
@@ -22,3 +25,4 @@ stop-mosquitto:
|
||||
test-docker:
|
||||
@docker-compose run -i test
|
||||
@docker-compose kill mosquitto-test
|
||||
@docker-compose rm -f
|
||||
|
||||
@@ -41,11 +41,10 @@ extension Client {
|
||||
}
|
||||
|
||||
import Logging
|
||||
import NIOTransportServices
|
||||
import EnvVars
|
||||
|
||||
public class AsyncClient {
|
||||
//public static let eventLoopGroup = NIOTSEventLoopGroup()
|
||||
|
||||
public static let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
|
||||
public let client: MQTTClient
|
||||
public private(set) var shuttingDown: Bool
|
||||
|
||||
@@ -21,6 +21,7 @@ var environment = try bootstrap(eventLoopGroup: eventLoopGroup, logger: logger,
|
||||
|
||||
// Set the log level to info only in production mode.
|
||||
if environment.envVars.appEnv == .production {
|
||||
logger.debug("Updating logging level to info.")
|
||||
logger.logLevel = .info
|
||||
}
|
||||
|
||||
@@ -43,7 +44,7 @@ while true {
|
||||
try client.subscribe().wait()
|
||||
Thread.sleep(forTimeInterval: 1)
|
||||
}
|
||||
|
||||
|
||||
// Check if sensors need processed.
|
||||
if state.sensors.needsProcessed {
|
||||
logger.debug("Sensor state has changed...")
|
||||
@@ -68,6 +69,6 @@ while true {
|
||||
// logger.debug("Fetching dew point...")
|
||||
//
|
||||
// logger.debug("Published dew point...")
|
||||
|
||||
|
||||
Thread.sleep(forTimeInterval: 5)
|
||||
}
|
||||
|
||||
19
buildServer.json
Executable file
19
buildServer.json
Executable file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "xcode build server",
|
||||
"version": "0.2",
|
||||
"bspVersion": "2.0",
|
||||
"languages": [
|
||||
"c",
|
||||
"cpp",
|
||||
"objective-c",
|
||||
"objective-cpp",
|
||||
"swift"
|
||||
],
|
||||
"argv": [
|
||||
"/opt/homebrew/bin/xcode-build-server"
|
||||
],
|
||||
"workspace": "/Volumes/michael/Repos/github.com/hvac-iot/swift-mqtt-dewPoint/.swiftpm/xcode/package.xcworkspace",
|
||||
"build_root": "/Volumes/michael/Repos/github.com",
|
||||
"scheme": "dewPoint-controller-Package",
|
||||
"kind": "xcode"
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# run this with docker-compose -f docker/docker-compose.yml run test
|
||||
# run this with docker-compose run test
|
||||
services:
|
||||
server:
|
||||
image: swift-mqtt-dewpoint:latest
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
env_file: .env
|
||||
|
||||
test:
|
||||
image: swift:latest
|
||||
image: swift:5.10
|
||||
#build:
|
||||
#context: ./
|
||||
platform: linux/amd64
|
||||
|
||||
Reference in New Issue
Block a user