Skip to content

Commit

Permalink
batching placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingFathead committed Dec 1, 2024
1 parent 5121428 commit c3b5023
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .catgitinclude
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
yolov8_live_rtmp_stream_detection.py
config.ini
# remote_sync.py
web_server.py
remote_sync.py
# web_server.py
7 changes: 6 additions & 1 deletion config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,9 @@ max_retries = 10
retry_delay = 1
# Maximum number of worker threads for remote sync
remote_sync_queue_maxsize = 0
max_workers = 3
# Maximum number of simultaneous remote worker accounts
max_workers = 1
# Interval in seconds to batch files before syncing.
# Set to 0 to disable batching (sync files immediately).
# ATTN: the batch interval is currently NOT implemented.
batch_interval = 1
4 changes: 4 additions & 0 deletions remote_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def __init__(self, config, main_logger, save_dir_base, aggregated_detections_fil
self.remote_sync_stop_event = threading.Event()
self.remote_sync_thread = None

# Batch Interval Configuration
self.BATCH_INTERVAL = config.getfloat('remote_sync', 'batch_interval', fallback=0)
self.logger.info(f"[NOT IN USE] Remote sync batch interval set to {self.BATCH_INTERVAL} seconds.")

# handle via thread pool executor
# self.executor = ThreadPoolExecutor(max_workers=5) # Adjust the number of workers as needed

Expand Down

0 comments on commit c3b5023

Please sign in to comment.