fixing issues of integration with wordpress plugin
This commit is contained in:
@@ -255,7 +255,7 @@ def process_scheduled_publications() -> Dict[str, Any]:
|
||||
due_content = Content.objects.filter(
|
||||
site_status='scheduled',
|
||||
scheduled_publish_at__lte=now
|
||||
).select_related('site', 'task')
|
||||
).select_related('site', 'sector', 'cluster')
|
||||
|
||||
for content in due_content:
|
||||
results['processed'] += 1
|
||||
@@ -284,11 +284,9 @@ def process_scheduled_publications() -> Dict[str, Any]:
|
||||
continue
|
||||
|
||||
# Queue the WordPress publishing task
|
||||
task_id = content.task_id if hasattr(content, 'task') and content.task else None
|
||||
publish_content_to_wordpress.delay(
|
||||
content_id=content.id,
|
||||
site_integration_id=site_integration.id,
|
||||
task_id=task_id
|
||||
site_integration_id=site_integration.id
|
||||
)
|
||||
|
||||
logger.info(f"Queued content {content.id} for WordPress publishing")
|
||||
|
||||
Reference in New Issue
Block a user