fix build: Fix Spark build after making config init async
This commit is contained in:
1 parent
2dd6c3d6a6
commit
46b4313f2a
28 files changed
+508
-238
No files matched your search
@@ -6,6 +6,8 @@
|
||||
using CommandLine;
|
||||
|
||||
using Spark.Api.Server;
|
||||
using Spark.Api.Services;
|
||||
using Spark.Core.Services;
|
||||
|
||||
using System;
|
||||
using System.Reactive.Linq;
|
||||
@@ -30,10 +32,12 @@
|
||||
Console.WriteLine("Starting spark_api_server... ");
|
||||
Log.notnull(opts.user);
|
||||
Log.notnull(opts.password);
|
||||
var service_ctx = ServiceContext.create(opts.sparkd);
|
||||
await service_ctx.login(opts.user, opts.password);
|
||||
var service_ctx = new ServiceContext(new SparkConfigLoader(new SparkConfigLoaderOpts() { ConfigServer = opts.sparkd } ));
|
||||
var loginService = new SparkdLoginService(service_ctx, new SparkApiCredentials() { User = opts.user, Password = opts.password });
|
||||
await loginService.LoginAsync();
|
||||
var userDataPermissions = new UserDataPermissions(loginService);
|
||||
|
||||
var sync = new bts.websocket_core.WebsocketDataSync(service_ctx);
|
||||
var sync = new bts.websocket_core.WebsocketDataSync(service_ctx, userDataPermissions);
|
||||
var gwy = new bts.websocket_core.WebsocketConnectionGateway();
|
||||
var prms = new WebsocketServerConfig {
|
||||
DefaultEndPoint = "/",
|
||||
|
||||
Reference in new issue
Block a user