feat(publishing): implement immediate raw ingestion, per-target Redis queues, and configurable post intervals & sleep windows
This commit is contained in:
@@ -143,9 +143,7 @@ class CollectorService:
|
||||
SOURCE_ACTIVITY_TOTAL.labels(channel_id=str(chat_id), title=source.title or 'Unknown').inc()
|
||||
logger.info(f"Collected raw post ID {post_id} from source channel {chat_id}")
|
||||
|
||||
if self.queue:
|
||||
await self.queue.push(post_id)
|
||||
elif self.on_post_received:
|
||||
if self.on_post_received:
|
||||
await self.on_post_received(post_id)
|
||||
except Exception as e:
|
||||
logger.error(f"Error handling message from {event.chat_id}: {e}", exc_info=True)
|
||||
@@ -216,9 +214,7 @@ class CollectorService:
|
||||
SOURCE_ACTIVITY_TOTAL.labels(channel_id=str(channel_id), title=source_title).inc()
|
||||
logger.info(f"Backfilled raw post ID {post_id} from {channel_id}")
|
||||
|
||||
if self.queue:
|
||||
await self.queue.push(post_id)
|
||||
elif self.on_post_received:
|
||||
if self.on_post_received:
|
||||
await self.on_post_received(post_id)
|
||||
else:
|
||||
skipped_count += 1
|
||||
|
||||
Reference in New Issue
Block a user