File size: 429 Bytes
399199a
 
c9c8879
9644187
 
 
399199a
9644187
c9c8879
 
 
 
 
399199a
 
c9c8879
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# celery_worker.py

from celery import Celery
from agents.strategy_agent import StrategyAgent
from memory.database import init_db, log_action

# Initialize DB once
init_db()

app = Celery("autoexec_ai", broker="redis://localhost:6379/0")

@app.task
def scheduled_loop():
    agent = StrategyAgent()
    result = agent.generate("fitness", "dropshipping")
    log_action("StrategyAgent", "scheduled_run", result)
    return result