nedo-vision-worker 1.3.6__tar.gz → 1.3.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/PKG-INFO +2 -1
  2. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/__init__.py +1 -1
  3. nedo_vision_worker-1.3.8/nedo_vision_worker/bootstrap.py +51 -0
  4. nedo_vision_worker-1.3.8/nedo_vision_worker/cli.py +75 -0
  5. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/config/ConfigurationManager.py +101 -106
  6. nedo_vision_worker-1.3.8/nedo_vision_worker/config/ConfigurationManagerInterface.py +12 -0
  7. nedo_vision_worker-1.3.8/nedo_vision_worker/config/DummyConfigurationManager.py +52 -0
  8. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/AIModelService_pb2_grpc.py +2 -2
  9. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/DatasetSourceService_pb2_grpc.py +2 -2
  10. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/HumanDetectionService_pb2_grpc.py +2 -2
  11. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/PPEDetectionService_pb2_grpc.py +2 -2
  12. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/VisionWorkerService_pb2_grpc.py +2 -2
  13. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/WorkerSourcePipelineService_pb2_grpc.py +2 -2
  14. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/WorkerSourceService_pb2.py +11 -11
  15. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/WorkerSourceService_pb2_grpc.py +2 -2
  16. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/ConnectionInfoClient.py +1 -1
  17. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/DirectDeviceToRTMPStreamer.py +64 -19
  18. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/GrpcClientBase.py +1 -0
  19. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/WorkerSourceClient.py +14 -3
  20. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/WorkerSourcePipelineClient.py +0 -2
  21. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/WorkerSourceUpdater.py +0 -4
  22. nedo_vision_worker-1.3.8/nedo_vision_worker/util/CorruptedImageValidator.py +55 -0
  23. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/DataSenderWorker.py +1 -1
  24. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/DatasetFrameWorker.py +4 -6
  25. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/RabbitMQListener.py +0 -4
  26. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker_service.py +13 -96
  27. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker.egg-info/PKG-INFO +2 -1
  28. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker.egg-info/SOURCES.txt +4 -2
  29. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker.egg-info/requires.txt +1 -0
  30. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/pyproject.toml +1 -0
  31. nedo_vision_worker-1.3.6/nedo_vision_worker/cli.py +0 -224
  32. nedo_vision_worker-1.3.6/nedo_vision_worker/initializer/AppInitializer.py +0 -138
  33. nedo_vision_worker-1.3.6/nedo_vision_worker/worker/__init__.py +0 -1
  34. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/README.md +0 -0
  35. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/config/__init__.py +0 -0
  36. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/database/DatabaseManager.py +0 -0
  37. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/database/__init__.py +0 -0
  38. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/doctor.py +0 -0
  39. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/__init__.py +0 -0
  40. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/ai_model.py +0 -0
  41. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/auth.py +0 -0
  42. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/config.py +0 -0
  43. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/dataset_source.py +0 -0
  44. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/logs.py +0 -0
  45. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/ppe_detection.py +0 -0
  46. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/ppe_detection_label.py +0 -0
  47. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/restricted_area_violation.py +0 -0
  48. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/user.py +0 -0
  49. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/worker_source.py +0 -0
  50. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/worker_source_pipeline.py +0 -0
  51. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/worker_source_pipeline_config.py +0 -0
  52. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/worker_source_pipeline_debug.py +0 -0
  53. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/models/worker_source_pipeline_detection.py +0 -0
  54. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/AIModelService_pb2.py +0 -0
  55. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/DatasetSourceService_pb2.py +0 -0
  56. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/HumanDetectionService_pb2.py +0 -0
  57. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/PPEDetectionService_pb2.py +0 -0
  58. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/VisionWorkerService_pb2.py +0 -0
  59. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/protos/WorkerSourcePipelineService_pb2.py +0 -0
  60. {nedo_vision_worker-1.3.6/nedo_vision_worker/initializer → nedo_vision_worker-1.3.8/nedo_vision_worker/protos}/__init__.py +0 -0
  61. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/repositories/AIModelRepository.py +0 -0
  62. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/repositories/DatasetSourceRepository.py +0 -0
  63. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/repositories/PPEDetectionRepository.py +0 -0
  64. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/repositories/RestrictedAreaRepository.py +0 -0
  65. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/repositories/WorkerSourcePipelineDebugRepository.py +0 -0
  66. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/repositories/WorkerSourcePipelineDetectionRepository.py +0 -0
  67. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/repositories/WorkerSourcePipelineRepository.py +0 -0
  68. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/repositories/WorkerSourceRepository.py +0 -0
  69. {nedo_vision_worker-1.3.6/nedo_vision_worker/protos → nedo_vision_worker-1.3.8/nedo_vision_worker/repositories}/__init__.py +0 -0
  70. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/AIModelClient.py +0 -0
  71. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/DatasetSourceClient.py +0 -0
  72. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/FileToRTMPServer.py +0 -0
  73. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/GrpcClientManager.py +0 -0
  74. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/GrpcConnection.py +0 -0
  75. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/ImageUploadClient.py +0 -0
  76. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/PPEDetectionClient.py +0 -0
  77. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/RTSPtoRTMPStreamer.py +0 -0
  78. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/RestrictedAreaClient.py +0 -0
  79. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/SharedDirectDeviceClient.py +0 -0
  80. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/SharedVideoStreamServer.py +0 -0
  81. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/SystemUsageClient.py +0 -0
  82. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/SystemWideDeviceCoordinator.py +0 -0
  83. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/VideoSharingDaemon.py +0 -0
  84. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/VideoStreamClient.py +0 -0
  85. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/services/WorkerStatusClient.py +0 -0
  86. {nedo_vision_worker-1.3.6/nedo_vision_worker/repositories → nedo_vision_worker-1.3.8/nedo_vision_worker/services}/__init__.py +0 -0
  87. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/util/EncoderSelector.py +0 -0
  88. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/util/FFmpegUtil.py +0 -0
  89. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/util/HardwareID.py +0 -0
  90. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/util/ImageUploader.py +0 -0
  91. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/util/Networking.py +0 -0
  92. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/util/PlatformDetector.py +0 -0
  93. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/util/SystemMonitor.py +0 -0
  94. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/util/VideoProbeUtil.py +0 -0
  95. {nedo_vision_worker-1.3.6/nedo_vision_worker/services → nedo_vision_worker-1.3.8/nedo_vision_worker/util}/__init__.py +0 -0
  96. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/CoreActionWorker.py +0 -0
  97. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/DataSyncWorker.py +0 -0
  98. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/DatasetFrameSender.py +0 -0
  99. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/PPEDetectionManager.py +0 -0
  100. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/PipelineActionWorker.py +0 -0
  101. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/PipelineImageWorker.py +0 -0
  102. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/PipelinePreviewWorker.py +0 -0
  103. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/RestrictedAreaManager.py +0 -0
  104. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/SystemUsageManager.py +0 -0
  105. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/VideoStreamWorker.py +0 -0
  106. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker/worker/WorkerManager.py +0 -0
  107. {nedo_vision_worker-1.3.6/nedo_vision_worker/util → nedo_vision_worker-1.3.8/nedo_vision_worker/worker}/__init__.py +0 -0
  108. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker.egg-info/dependency_links.txt +0 -0
  109. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker.egg-info/entry_points.txt +0 -0
  110. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/nedo_vision_worker.egg-info/top_level.txt +0 -0
  111. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/setup.cfg +0 -0
  112. {nedo_vision_worker-1.3.6 → nedo_vision_worker-1.3.8}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nedo-vision-worker
3
- Version: 1.3.6
3
+ Version: 1.3.8
4
4
  Summary: Nedo Vision Worker Service Library for AI Vision Processing
5
5
  Author-email: Willy Achmat Fauzi <willy.achmat@gmail.com>
6
6
  Maintainer-email: Willy Achmat Fauzi <willy.achmat@gmail.com>
@@ -40,6 +40,7 @@ Requires-Dist: protobuf>=3.20.0
40
40
  Requires-Dist: psutil>=5.9.0
41
41
  Requires-Dist: requests>=2.28.0
42
42
  Requires-Dist: SQLAlchemy>=1.4.0
43
+ Requires-Dist: Pillow>=12.1.0
43
44
  Requires-Dist: pynvml>=11.4.1; platform_system != "Darwin" or platform_machine != "arm64"
44
45
  Provides-Extra: opencv
45
46
  Requires-Dist: opencv-python>=4.6.0; platform_machine not in "aarch64 armv7l" and extra == "opencv"
@@ -6,5 +6,5 @@ A library for running worker agents in the Nedo Vision platform.
6
6
 
7
7
  from .worker_service import WorkerService
8
8
 
9
- __version__ = "1.3.6"
9
+ __version__ = "1.3.8"
10
10
  __all__ = ["WorkerService"]
@@ -0,0 +1,51 @@
1
+ import logging
2
+ from nedo_vision_worker.config.ConfigurationManager import ConfigurationManager
3
+ from nedo_vision_worker.database.DatabaseManager import set_storage_path, DatabaseManager
4
+ from nedo_vision_worker.worker_service import WorkerService
5
+
6
+
7
+ def start_worker(
8
+ *,
9
+ server_host: str,
10
+ server_port: int,
11
+ token: str,
12
+ system_usage_interval: int,
13
+ rtmp_server: str,
14
+ storage_path: str,
15
+ log_level: str = "INFO",
16
+ ) -> WorkerService:
17
+ # Logging (only once, force allowed)
18
+ logging.basicConfig(
19
+ level=getattr(logging, log_level),
20
+ format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
21
+ force=True,
22
+ )
23
+
24
+ logger = logging.getLogger("nedo-worker")
25
+
26
+ # Storage & DB
27
+ set_storage_path(storage_path)
28
+ DatabaseManager.init_databases()
29
+
30
+ # Configuration
31
+ configuration_manager = ConfigurationManager(
32
+ worker_token=token,
33
+ server_host=server_host,
34
+ server_port=server_port,
35
+ rtmp_server_url=rtmp_server,
36
+ logger=logging.getLogger("configuration_manager"),
37
+ )
38
+
39
+ service = WorkerService(
40
+ configuration_manager=configuration_manager,
41
+ server_host=server_host,
42
+ token=token,
43
+ system_usage_interval=system_usage_interval,
44
+ rtmp_server=rtmp_server,
45
+ storage_path=storage_path,
46
+ )
47
+
48
+ logger.info("🚀 Starting Nedo Vision Worker Service")
49
+ service.run()
50
+
51
+ return service
@@ -0,0 +1,75 @@
1
+ import argparse
2
+ import signal
3
+ import sys
4
+ import logging
5
+ from typing import NoReturn
6
+
7
+ from nedo_vision_worker.bootstrap import start_worker
8
+
9
+
10
+ class NedoWorkerCLI:
11
+ def __init__(self):
12
+ self.logger = logging.getLogger(__name__)
13
+ self._setup_signal_handlers()
14
+ self._service = None
15
+
16
+ def _setup_signal_handlers(self) -> None:
17
+ signal.signal(signal.SIGINT, self._signal_handler)
18
+ signal.signal(signal.SIGTERM, self._signal_handler)
19
+
20
+ def _signal_handler(self, signum: int, frame) -> NoReturn:
21
+ self.logger.info("🛑 Shutdown signal received")
22
+ if self._service and hasattr(self._service, "stop"):
23
+ self._service.stop()
24
+ sys.exit(0)
25
+
26
+ def create_parser(self) -> argparse.ArgumentParser:
27
+ parser = argparse.ArgumentParser(description="Nedo Vision Worker Service")
28
+
29
+ parser.add_argument("--version", action="version", version="nedo-vision-worker 1.2.1")
30
+
31
+ subparsers = parser.add_subparsers(dest="command", required=True)
32
+
33
+ subparsers.add_parser("doctor", help="Check system dependencies")
34
+
35
+ run = subparsers.add_parser("run", help="Start worker")
36
+
37
+ run.add_argument("--token", required=True)
38
+ run.add_argument("--server-host", default="be.vision.sindika.co.id")
39
+ run.add_argument("--server-port", type=int, default=50051)
40
+ run.add_argument("--rtmp-server", default="rtmp://live.vision.sindika.co.id:1935/live")
41
+ run.add_argument("--storage-path", default="data")
42
+ run.add_argument("--system-usage-interval", type=int, default=30)
43
+ run.add_argument("--log-level", default="INFO")
44
+
45
+ return parser
46
+
47
+ def run(self) -> int:
48
+ parser = self.create_parser()
49
+ args = parser.parse_args()
50
+
51
+ if args.command == "doctor":
52
+ from nedo_vision_worker.doctor import main as doctor_main
53
+ return doctor_main()
54
+
55
+ if args.command == "run":
56
+ self._service = start_worker(
57
+ server_host=args.server_host,
58
+ server_port=args.server_port,
59
+ token=args.token,
60
+ system_usage_interval=args.system_usage_interval,
61
+ rtmp_server=args.rtmp_server,
62
+ storage_path=args.storage_path,
63
+ log_level=args.log_level,
64
+ )
65
+ signal.pause() # wait for signal
66
+
67
+ return 0
68
+
69
+
70
+ def main() -> int:
71
+ return NedoWorkerCLI().run()
72
+
73
+
74
+ if __name__ == "__main__":
75
+ sys.exit(main())
@@ -1,84 +1,138 @@
1
1
  import logging
2
+ import grpc
3
+ from typing import Optional
2
4
  from ..models.config import ConfigEntity # ORM model for server_config
3
5
  from ..database.DatabaseManager import DatabaseManager # DatabaseManager for managing sessions
4
6
 
7
+ from ..util.HardwareID import HardwareID
8
+ from ..services.ConnectionInfoClient import ConnectionInfoClient
9
+ from .ConfigurationManagerInterface import ConfigurationManagerInterface
5
10
 
6
- class ConfigurationManager:
11
+ class ConfigurationManager(ConfigurationManagerInterface):
7
12
  """
8
- A class to manage server configuration stored in the 'config' database using SQLAlchemy.
13
+ A class to manage local and remote configuration stored in the 'config' database.
9
14
  """
10
15
 
11
- @staticmethod
12
- def init_database():
13
- """
14
- Initialize the 'config' database and create the `server_config` table if it doesn't exist.
15
- """
16
+ def __init__(self, worker_token: str, server_host: str, server_port: int, rtmp_server_url: str, logger: logging.Logger):
16
17
  try:
17
- DatabaseManager.init_databases()
18
+ self._logger = logger
19
+ self._worker_token = worker_token
20
+ self._server_host = server_host
21
+ self._server_port = server_port
22
+ self._rtmp_server_url = rtmp_server_url
23
+
24
+ self._initialize_remote_configuration()
25
+
18
26
  logging.info("✅ [APP] Configuration database initialized successfully.")
19
27
  except Exception as e:
20
28
  logging.exception("❌ [APP] Failed to initialize the configuration database.")
21
29
  raise RuntimeError("Database initialization failed.") from e
22
-
23
- @staticmethod
24
- def is_config_initialized() -> bool:
30
+
31
+ def get_config(self, key: str) -> str:
25
32
  """
26
- Check if the configuration is already initialized.
33
+ Retrieve the value of a specific configuration key from the 'config' database.
34
+
35
+ Args:
36
+ key (str): The configuration key.
27
37
 
28
38
  Returns:
29
- bool: True if configuration exists, False otherwise.
39
+ str: The configuration value, or None if the key does not exist.
30
40
  """
41
+ if not key or not isinstance(key, str):
42
+ raise ValueError("⚠️ The 'key' must be a non-empty string.")
43
+
31
44
  session = None
32
45
  try:
33
46
  session = DatabaseManager.get_session("config")
34
- config_count = session.query(ConfigEntity).count()
35
- return config_count > 0 # True if at least one config exists
47
+ logging.info(f"🔍 [APP] Retrieving configuration key: {key}")
48
+ config = session.query(ConfigEntity).filter_by(key=key).first()
49
+ if config:
50
+ logging.info(f"✅ [APP] Configuration key '{key}' retrieved successfully.")
51
+ return config.value
52
+ else:
53
+ logging.warning(f"⚠️ [APP] Configuration key '{key}' not found.")
54
+ return ""
36
55
  except Exception as e:
37
- logging.exception("❌ [APP] Failed to check if configuration is initialized.")
38
- return False
56
+ logging.exception(f"❌ [APP] Failed to retrieve configuration key '{key}': {e}")
57
+ raise RuntimeError(f"Failed to retrieve configuration key '{key}'") from e
39
58
  finally:
40
59
  if session:
41
60
  session.close()
42
-
43
- @staticmethod
44
- def set_config(key: str, value: str):
61
+
62
+ def get_all_configs(self) -> Optional[dict]:
45
63
  """
46
- Set or update a configuration key-value pair in the 'config' database.
64
+ Retrieve all configuration key-value pairs from the 'config' database.
47
65
 
48
- Args:
49
- key (str): The configuration key.
50
- value (str): The configuration value.
66
+ Returns:
67
+ dict: A dictionary of all configuration key-value pairs.
51
68
  """
52
- if not key or not isinstance(key, str):
53
- raise ValueError("⚠️ [APP] The 'key' must be a non-empty string.")
54
- if not isinstance(value, str):
55
- raise ValueError("⚠️ [APP] The 'value' must be a string.")
56
-
57
69
  session = None
58
70
  try:
59
71
  session = DatabaseManager.get_session("config")
60
- logging.info(f"🔧 Attempting to set configuration: {key} = {value}")
61
- existing_config = session.query(ConfigEntity).filter_by(key=key).first()
62
- if existing_config:
63
- logging.info(f"🔄 [APP] Updating configuration key: {key}")
64
- existing_config.value = value
72
+ logging.info("🔍 [APP] Retrieving all configuration keys.")
73
+ configs = session.query(ConfigEntity).all()
74
+ if configs:
75
+ logging.info(" [APP] All configuration keys retrieved successfully.")
76
+ return {config.key: config.value for config in configs}
65
77
  else:
66
- logging.info(f" [APP] Adding new configuration key: {key}")
67
- new_config = ConfigEntity(key=key, value=value)
68
- session.add(new_config)
69
- session.commit()
70
- logging.info(f"✅ [APP] Configuration key '{key}' set successfully.")
78
+ logging.info("⚠️ [APP] No configuration keys found.")
79
+ return None
71
80
  except Exception as e:
72
- if session:
73
- session.rollback()
74
- logging.exception(f"❌ [APP] Failed to set configuration key '{key}': {e}")
75
- raise RuntimeError(f"Failed to set configuration key '{key}'") from e
81
+ logging.exception("❌ [APP] Failed to retrieve all configuration keys.")
82
+ raise RuntimeError("Failed to retrieve all configuration keys.") from e
76
83
  finally:
77
84
  if session:
78
85
  session.close()
79
86
 
80
- @staticmethod
81
- def set_config_batch(configs: dict):
87
+ def _initialize_remote_configuration(self):
88
+ """
89
+ Initialize the application configuration using the provided token
90
+ and saving configuration data locally.
91
+ """
92
+ try:
93
+ # Get hardware ID
94
+ hardware_id = HardwareID.get_unique_id()
95
+
96
+ self._logger.info(f"🖥️ [APP] Detected Hardware ID: {hardware_id}")
97
+ self._logger.info(f"🌐 [APP] Using Server Host: {self._server_host}")
98
+
99
+ # Check if token is provided
100
+ if not self._worker_token:
101
+ raise ValueError("Token is required for worker initialization. Please provide a token obtained from the frontend.")
102
+
103
+ # Get connection info using the ConnectionInfoClient
104
+ connection_client = ConnectionInfoClient(self._server_host, self._server_port, self._worker_token)
105
+ connection_result = connection_client.get_connection_info()
106
+
107
+ if not connection_result["success"]:
108
+ logging.error(f"Device connection info failed: {connection_result['message']}")
109
+ raise ValueError(f"Initializing remote config failed, reason: {connection_result['message']}")
110
+
111
+ worker_id = connection_result.get('id')
112
+ if not worker_id:
113
+ raise ValueError("No worker_id returned from connection info!")
114
+
115
+ self._set_config_batch({
116
+ "worker_id": worker_id,
117
+ "server_host": self._server_host,
118
+ "rtmp_server": self._rtmp_server_url,
119
+ "server_port": str(self._server_port),
120
+ "token": self._worker_token,
121
+ "rabbitmq_host": connection_result['rabbitmq_host'],
122
+ "rabbitmq_port": str(connection_result['rabbitmq_port']),
123
+ "rabbitmq_username": connection_result['rabbitmq_username'],
124
+ "rabbitmq_password": connection_result['rabbitmq_password']
125
+ })
126
+ self._print_config()
127
+
128
+ except ValueError as ve:
129
+ logging.error(f"Validation error: {ve}")
130
+ except grpc.RpcError as ge:
131
+ logging.error(f"Grpc Error: {ge}")
132
+ except Exception as e:
133
+ logging.error(f"Unexpected error during initialization: {e}")
134
+
135
+ def _set_config_batch(self, configs: dict):
82
136
  """
83
137
  Set or update multiple configuration key-value pairs in the 'config' database in a batch operation.
84
138
 
@@ -116,71 +170,12 @@ class ConfigurationManager:
116
170
  if session:
117
171
  session.close()
118
172
 
119
- @staticmethod
120
- def get_config(key: str) -> str:
121
- """
122
- Retrieve the value of a specific configuration key from the 'config' database.
123
-
124
- Args:
125
- key (str): The configuration key.
126
-
127
- Returns:
128
- str: The configuration value, or None if the key does not exist.
129
- """
130
- if not key or not isinstance(key, str):
131
- raise ValueError("⚠️ The 'key' must be a non-empty string.")
132
-
133
- session = None
134
- try:
135
- session = DatabaseManager.get_session("config")
136
- logging.info(f"🔍 [APP] Retrieving configuration key: {key}")
137
- config = session.query(ConfigEntity).filter_by(key=key).first()
138
- if config:
139
- logging.info(f"✅ [APP] Configuration key '{key}' retrieved successfully.")
140
- return config.value
141
- else:
142
- logging.warning(f"⚠️ [APP] Configuration key '{key}' not found.")
143
- return None
144
- except Exception as e:
145
- logging.exception(f"❌ [APP] Failed to retrieve configuration key '{key}': {e}")
146
- raise RuntimeError(f"Failed to retrieve configuration key '{key}'") from e
147
- finally:
148
- if session:
149
- session.close()
150
-
151
- @staticmethod
152
- def get_all_configs() -> dict:
153
- """
154
- Retrieve all configuration key-value pairs from the 'config' database.
155
-
156
- Returns:
157
- dict: A dictionary of all configuration key-value pairs.
158
- """
159
- session = None
160
- try:
161
- session = DatabaseManager.get_session("config")
162
- logging.info("🔍 [APP] Retrieving all configuration keys.")
163
- configs = session.query(ConfigEntity).all()
164
- if configs:
165
- logging.info("✅ [APP] All configuration keys retrieved successfully.")
166
- return {config.key: config.value for config in configs}
167
- else:
168
- logging.info("⚠️ [APP] No configuration keys found.")
169
- return {}
170
- except Exception as e:
171
- logging.exception("❌ [APP] Failed to retrieve all configuration keys.")
172
- raise RuntimeError("Failed to retrieve all configuration keys.") from e
173
- finally:
174
- if session:
175
- session.close()
176
-
177
- @staticmethod
178
- def print_config():
173
+ def _print_config(self):
179
174
  """
180
175
  Print all configuration key-value pairs to the console.
181
176
  """
182
177
  try:
183
- configs = ConfigurationManager.get_all_configs()
178
+ configs = self.get_all_configs()
184
179
  if configs:
185
180
  print("📄 Current Configuration:")
186
181
  for key, value in configs.items():
@@ -0,0 +1,12 @@
1
+ from typing import Optional
2
+ from abc import ABC, abstractmethod
3
+
4
+
5
+ class ConfigurationManagerInterface(ABC):
6
+ @abstractmethod
7
+ def get_config(self, key: str) -> str:
8
+ pass
9
+
10
+ @abstractmethod
11
+ def get_all_configs(self) -> Optional[dict]:
12
+ pass
@@ -0,0 +1,52 @@
1
+ import logging
2
+ from typing import Optional
3
+
4
+ from .ConfigurationManagerInterface import ConfigurationManagerInterface
5
+
6
+ class DummyConfigurationManager(ConfigurationManagerInterface):
7
+ """
8
+ A class to manage local and remote configuration stored in the 'config' database.
9
+ """
10
+
11
+ def __init__(
12
+ self,
13
+ worker_id: str,
14
+ worker_token: str,
15
+ server_host: str,
16
+ server_port: str,
17
+ rtmp_server_url: str,
18
+ rabbitmq_host: str,
19
+ rabbitmq_port: str,
20
+ rabbitmq_username: str,
21
+ rabbitmq_password: str,
22
+ logger: logging.Logger
23
+ ):
24
+ self._logger = logger
25
+ self._worker_id = worker_id
26
+ self._worker_token = worker_token
27
+ self._server_host = server_host
28
+ self._server_port = server_port
29
+ self._rtmp_server_url = rtmp_server_url
30
+ self._rabbitmq_host = rabbitmq_host
31
+ self._rabbitmq_port = rabbitmq_port
32
+ self._rabbitmq_username = rabbitmq_username
33
+ self._rabbitmq_password = rabbitmq_password
34
+
35
+ self._config = {
36
+ "worker_id": self._worker_id,
37
+ "token": self._worker_token,
38
+ "server_host": self._server_host,
39
+ "server_port": str(self._server_port),
40
+ "rtmp_server": self._rtmp_server_url,
41
+ "rabbitmq_host": self._rabbitmq_host,
42
+ "rabbitmq_port": self._rabbitmq_port,
43
+ "rabbitmq_username": self._rabbitmq_username,
44
+ "rabbitmq_password": self._rabbitmq_password,
45
+ }
46
+
47
+
48
+ def get_config(self, key: str) -> str:
49
+ return self._config[key]
50
+
51
+ def get_all_configs(self) -> Optional[dict]:
52
+ return self._config
@@ -5,7 +5,7 @@ import warnings
5
5
 
6
6
  from nedo_vision_worker.protos import AIModelService_pb2 as nedo__vision__worker_dot_protos_dot_AIModelService__pb2
7
7
 
8
- GRPC_GENERATED_VERSION = '1.74.0'
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
10
10
  _version_not_supported = False
11
11
 
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in nedo_vision_worker/protos/AIModelService_pb2_grpc.py depends on'
21
+ + ' but the generated code in nedo_vision_worker/protos/AIModelService_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -5,7 +5,7 @@ import warnings
5
5
 
6
6
  from nedo_vision_worker.protos import DatasetSourceService_pb2 as nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2
7
7
 
8
- GRPC_GENERATED_VERSION = '1.74.0'
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
10
10
  _version_not_supported = False
11
11
 
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in nedo_vision_worker/protos/DatasetSourceService_pb2_grpc.py depends on'
21
+ + ' but the generated code in nedo_vision_worker/protos/DatasetSourceService_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -5,7 +5,7 @@ import warnings
5
5
 
6
6
  from nedo_vision_worker.protos import HumanDetectionService_pb2 as nedo__vision__worker_dot_protos_dot_HumanDetectionService__pb2
7
7
 
8
- GRPC_GENERATED_VERSION = '1.74.0'
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
10
10
  _version_not_supported = False
11
11
 
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in nedo_vision_worker/protos/HumanDetectionService_pb2_grpc.py depends on'
21
+ + ' but the generated code in nedo_vision_worker/protos/HumanDetectionService_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -5,7 +5,7 @@ import warnings
5
5
 
6
6
  from nedo_vision_worker.protos import PPEDetectionService_pb2 as nedo__vision__worker_dot_protos_dot_PPEDetectionService__pb2
7
7
 
8
- GRPC_GENERATED_VERSION = '1.74.0'
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
10
10
  _version_not_supported = False
11
11
 
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in nedo_vision_worker/protos/PPEDetectionService_pb2_grpc.py depends on'
21
+ + ' but the generated code in nedo_vision_worker/protos/PPEDetectionService_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -5,7 +5,7 @@ import warnings
5
5
 
6
6
  from nedo_vision_worker.protos import VisionWorkerService_pb2 as nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2
7
7
 
8
- GRPC_GENERATED_VERSION = '1.74.0'
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
10
10
  _version_not_supported = False
11
11
 
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in nedo_vision_worker/protos/VisionWorkerService_pb2_grpc.py depends on'
21
+ + ' but the generated code in nedo_vision_worker/protos/VisionWorkerService_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -5,7 +5,7 @@ import warnings
5
5
 
6
6
  from nedo_vision_worker.protos import WorkerSourcePipelineService_pb2 as nedo__vision__worker_dot_protos_dot_WorkerSourcePipelineService__pb2
7
7
 
8
- GRPC_GENERATED_VERSION = '1.74.0'
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
10
10
  _version_not_supported = False
11
11
 
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in nedo_vision_worker/protos/WorkerSourcePipelineService_pb2_grpc.py depends on'
21
+ + ' but the generated code in nedo_vision_worker/protos/WorkerSourcePipelineService_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -24,7 +24,7 @@ _sym_db = _symbol_database.Default()
24
24
 
25
25
 
26
26
 
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n3nedo_vision_worker/protos/WorkerSourceService.proto\x12\x1eSindika.AspNet.App005.Services\">\n\x1aGetWorkerSourceListRequest\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"\x9b\x01\n\x19UpdateWorkerSourceRequest\x12\x18\n\x10worker_source_id\x18\x01 \x01(\t\x12\x12\n\nresolution\x18\x02 \x01(\t\x12\x13\n\x0bstatus_code\x18\x03 \x01(\t\x12\x12\n\nframe_rate\x18\x04 \x01(\x01\x12\x18\n\x10worker_timestamp\x18\x05 \x01(\t\x12\r\n\x05token\x18\x06 \x01(\t\"\x80\x01\n\x18WorkerSourceListResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x42\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\x34.Sindika.AspNet.App005.Services.WorkerSourceResponse\"v\n\x14WorkerSourceResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\tworker_id\x18\x03 \x01(\t\x12\x11\n\ttype_code\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x11\n\tfile_path\x18\x06 \x01(\t\">\n\x1aUpdateWorkerSourceResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"=\n\x19\x44ownloadSourceFileRequest\x12\x11\n\tsource_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"0\n\x1a\x44ownloadSourceFileResponse\x12\x12\n\nfile_chunk\x18\x01 \x01(\x0c\x32\xb4\x03\n\x13WorkerSourceService\x12\x8b\x01\n\x13GetWorkerSourceList\x12:.Sindika.AspNet.App005.Services.GetWorkerSourceListRequest\x1a\x38.Sindika.AspNet.App005.Services.WorkerSourceListResponse\x12\x7f\n\x06Update\x12\x39.Sindika.AspNet.App005.Services.UpdateWorkerSourceRequest\x1a:.Sindika.AspNet.App005.Services.UpdateWorkerSourceResponse\x12\x8d\x01\n\x12\x44ownloadSourceFile\x12\x39.Sindika.AspNet.App005.Services.DownloadSourceFileRequest\x1a:.Sindika.AspNet.App005.Services.DownloadSourceFileResponse0\x01\x62\x06proto3')
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n3nedo_vision_worker/protos/WorkerSourceService.proto\x12\x1eSindika.AspNet.App005.Services\">\n\x1aGetWorkerSourceListRequest\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"\x9b\x01\n\x19UpdateWorkerSourceRequest\x12\x18\n\x10worker_source_id\x18\x01 \x01(\t\x12\x12\n\nresolution\x18\x02 \x01(\t\x12\x13\n\x0bstatus_code\x18\x03 \x01(\t\x12\x12\n\nframe_rate\x18\x04 \x01(\x01\x12\x18\n\x10worker_timestamp\x18\x05 \x01(\t\x12\r\n\x05token\x18\x06 \x01(\t\"\x80\x01\n\x18WorkerSourceListResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x42\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\x34.Sindika.AspNet.App005.Services.WorkerSourceResponse\"\xb3\x01\n\x14WorkerSourceResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\tworker_id\x18\x03 \x01(\t\x12\x11\n\ttype_code\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x11\n\tfile_path\x18\x06 \x01(\t\x12\x12\n\nresolution\x18\x07 \x01(\t\x12\x13\n\x0bstatus_code\x18\x08 \x01(\t\x12\x12\n\nframe_rate\x18\t \x01(\x01\">\n\x1aUpdateWorkerSourceResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"=\n\x19\x44ownloadSourceFileRequest\x12\x11\n\tsource_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"0\n\x1a\x44ownloadSourceFileResponse\x12\x12\n\nfile_chunk\x18\x01 \x01(\x0c\x32\xb4\x03\n\x13WorkerSourceService\x12\x8b\x01\n\x13GetWorkerSourceList\x12:.Sindika.AspNet.App005.Services.GetWorkerSourceListRequest\x1a\x38.Sindika.AspNet.App005.Services.WorkerSourceListResponse\x12\x7f\n\x06Update\x12\x39.Sindika.AspNet.App005.Services.UpdateWorkerSourceRequest\x1a:.Sindika.AspNet.App005.Services.UpdateWorkerSourceResponse\x12\x8d\x01\n\x12\x44ownloadSourceFile\x12\x39.Sindika.AspNet.App005.Services.DownloadSourceFileRequest\x1a:.Sindika.AspNet.App005.Services.DownloadSourceFileResponse0\x01\x62\x06proto3')
28
28
 
29
29
  _globals = globals()
30
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -37,14 +37,14 @@ if not _descriptor._USE_C_DESCRIPTORS:
37
37
  _globals['_UPDATEWORKERSOURCEREQUEST']._serialized_end=307
38
38
  _globals['_WORKERSOURCELISTRESPONSE']._serialized_start=310
39
39
  _globals['_WORKERSOURCELISTRESPONSE']._serialized_end=438
40
- _globals['_WORKERSOURCERESPONSE']._serialized_start=440
41
- _globals['_WORKERSOURCERESPONSE']._serialized_end=558
42
- _globals['_UPDATEWORKERSOURCERESPONSE']._serialized_start=560
43
- _globals['_UPDATEWORKERSOURCERESPONSE']._serialized_end=622
44
- _globals['_DOWNLOADSOURCEFILEREQUEST']._serialized_start=624
45
- _globals['_DOWNLOADSOURCEFILEREQUEST']._serialized_end=685
46
- _globals['_DOWNLOADSOURCEFILERESPONSE']._serialized_start=687
47
- _globals['_DOWNLOADSOURCEFILERESPONSE']._serialized_end=735
48
- _globals['_WORKERSOURCESERVICE']._serialized_start=738
49
- _globals['_WORKERSOURCESERVICE']._serialized_end=1174
40
+ _globals['_WORKERSOURCERESPONSE']._serialized_start=441
41
+ _globals['_WORKERSOURCERESPONSE']._serialized_end=620
42
+ _globals['_UPDATEWORKERSOURCERESPONSE']._serialized_start=622
43
+ _globals['_UPDATEWORKERSOURCERESPONSE']._serialized_end=684
44
+ _globals['_DOWNLOADSOURCEFILEREQUEST']._serialized_start=686
45
+ _globals['_DOWNLOADSOURCEFILEREQUEST']._serialized_end=747
46
+ _globals['_DOWNLOADSOURCEFILERESPONSE']._serialized_start=749
47
+ _globals['_DOWNLOADSOURCEFILERESPONSE']._serialized_end=797
48
+ _globals['_WORKERSOURCESERVICE']._serialized_start=800
49
+ _globals['_WORKERSOURCESERVICE']._serialized_end=1236
50
50
  # @@protoc_insertion_point(module_scope)
@@ -5,7 +5,7 @@ import warnings
5
5
 
6
6
  from nedo_vision_worker.protos import WorkerSourceService_pb2 as nedo__vision__worker_dot_protos_dot_WorkerSourceService__pb2
7
7
 
8
- GRPC_GENERATED_VERSION = '1.74.0'
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
10
10
  _version_not_supported = False
11
11
 
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in nedo_vision_worker/protos/WorkerSourceService_pb2_grpc.py depends on'
21
+ + ' but the generated code in nedo_vision_worker/protos/WorkerSourceService_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -31,7 +31,7 @@ class ConnectionInfoClient(GrpcClientBase):
31
31
  try:
32
32
  if not self.stub:
33
33
  raise Exception("Not connected to manager")
34
-
34
+
35
35
  # Prepare the request
36
36
  request = GetWorkerConnectionInfoRequest(token=self.token)
37
37