feat: distributed rendering with Celery
- celery_app.py: Celery configuration with Redis broker - tasks.py: render_effect task with full provenance tracking - render.py: CLI for submitting render jobs - Successfully renders cat → dog with provenance chain 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
31
celery_app.py
Normal file
31
celery_app.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""
|
||||
Art DAG Celery Application
|
||||
|
||||
Distributed rendering for the Art DAG system.
|
||||
Uses the foundational artdag language from GitHub.
|
||||
"""
|
||||
|
||||
from celery import Celery
|
||||
|
||||
app = Celery(
|
||||
'art_celery',
|
||||
broker='redis://localhost:6379/5',
|
||||
backend='redis://localhost:6379/5',
|
||||
include=['tasks']
|
||||
)
|
||||
|
||||
app.conf.update(
|
||||
result_expires=3600,
|
||||
task_serializer='json',
|
||||
accept_content=['json', 'pickle'], # pickle needed for internal Celery messages
|
||||
result_serializer='json',
|
||||
event_serializer='json',
|
||||
timezone='UTC',
|
||||
enable_utc=True,
|
||||
task_track_started=True,
|
||||
task_acks_late=True,
|
||||
worker_prefetch_multiplier=1,
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.start()
|
||||
Reference in New Issue
Block a user