behaviour/agressiveness sliders, fix cob data using provider
This commit is contained in:
@ -85,8 +85,14 @@ class COBIntegration:
|
||||
self.cob_provider.subscribe_to_cob_updates(self._on_cob_update)
|
||||
self.cob_provider.subscribe_to_bucket_updates(self._on_bucket_update)
|
||||
|
||||
# Start COB provider
|
||||
await self.cob_provider.start_streaming()
|
||||
# Start COB provider streaming
|
||||
try:
|
||||
logger.info("Starting COB provider streaming...")
|
||||
await self.cob_provider.start_streaming()
|
||||
except Exception as e:
|
||||
logger.error(f"Error starting COB provider streaming: {e}")
|
||||
# Start a background task instead
|
||||
asyncio.create_task(self._start_cob_provider_background())
|
||||
|
||||
# Start analysis threads
|
||||
asyncio.create_task(self._continuous_cob_analysis())
|
||||
@ -94,6 +100,14 @@ class COBIntegration:
|
||||
|
||||
logger.info("COB Integration started successfully")
|
||||
|
||||
async def _start_cob_provider_background(self):
|
||||
"""Start COB provider in background task"""
|
||||
try:
|
||||
logger.info("Starting COB provider in background...")
|
||||
await self.cob_provider.start_streaming()
|
||||
except Exception as e:
|
||||
logger.error(f"Error in background COB provider: {e}")
|
||||
|
||||
async def stop(self):
|
||||
"""Stop COB integration"""
|
||||
logger.info("Stopping COB Integration")
|
||||
|
Reference in New Issue
Block a user