mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 08:06:31 +00:00
fix close external clients
This commit is contained in:
@@ -395,6 +395,7 @@ public partial class Annotator
|
||||
MainCancellationSource.Cancel();
|
||||
_inferenceService.StopInference();
|
||||
DetectionCancellationSource.Cancel();
|
||||
|
||||
_mediaPlayer.Stop();
|
||||
_mediaPlayer.Dispose();
|
||||
_libVLC.Dispose();
|
||||
|
||||
@@ -54,7 +54,7 @@ public abstract class BaseZeroMqExternalClient : IExternalClient
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
throw;
|
||||
//throw;
|
||||
}
|
||||
|
||||
_dealer.Options.Identity = Encoding.UTF8.GetBytes(_clientId.ToString("N"));
|
||||
|
||||
@@ -8,6 +8,7 @@ using Azaion.Common.DTO;
|
||||
using Azaion.Common.DTO.Config;
|
||||
using Azaion.Common.Extensions;
|
||||
using Azaion.Common.Services;
|
||||
using Azaion.CommonSecurity;
|
||||
using Azaion.CommonSecurity.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -35,7 +36,8 @@ public partial class MainSuite
|
||||
IGalleryService galleryService,
|
||||
IDbFactory dbFactory,
|
||||
IResourceLoader resourceLoader,
|
||||
IEnumerable<IExternalClient> externalClients)
|
||||
[FromKeyedServices(SecurityConstants.EXTERNAL_INFERENCE_PATH)] IExternalClient inferenceClient,
|
||||
[FromKeyedServices(SecurityConstants.EXTERNAL_GPS_DENIED_PATH)] IExternalClient gpsClient)
|
||||
{
|
||||
_configUpdater = configUpdater;
|
||||
_modules = modules;
|
||||
@@ -43,7 +45,7 @@ public partial class MainSuite
|
||||
_galleryService = galleryService;
|
||||
_dbFactory = dbFactory;
|
||||
_resourceLoader = resourceLoader;
|
||||
_externalClients = externalClients;
|
||||
_externalClients = [inferenceClient, gpsClient];
|
||||
_appConfig = appConfig.Value;
|
||||
InitializeComponent();
|
||||
Loaded += OnLoaded;
|
||||
|
||||
@@ -50,7 +50,9 @@
|
||||
|
||||
"TrackingDistanceConfidence": 0.15,
|
||||
"TrackingProbabilityIncrease": 15.0,
|
||||
"TrackingIntersectionThreshold": 0.8
|
||||
"TrackingIntersectionThreshold": 0.8,
|
||||
|
||||
"ModelBatchSize": 2
|
||||
},
|
||||
"ThumbnailConfig": { "Size": "240,135", "Border": 10 }
|
||||
}
|
||||
Reference in New Issue
Block a user