system-prompts-and-models-o.../salesflow-saas/backend/app/workers/celery_app.py
Claude 5f3b0b9a20
Migrate SalesMatic to Dealix + Add complete affiliate recruitment & AI sales system
- Rename all SalesMatic references to Dealix (ديل اي اكس) across frontend, backend, configs, and SVG logos
- Add complete automated affiliate recruitment system with:
  - Job posting templates (Arabic/English) with ad variations for social media, LinkedIn, job boards
  - Full onboarding package: welcome guide, company profile, step-by-step guide, FAQ (60+ Q&A), targets & earnings
  - Sales scripts: phone calls, WhatsApp, in-person, email templates, objection handling (15+), closing techniques
  - Targeting guides: social media, AI tools, Google, LinkedIn, local business, referral strategies
  - Legal agreements: freelance contract, employment offer (10+ deals/month auto-hire), commission structure
  - AI chatbot for affiliates: config, knowledge base, conversation flows
- Add professional sector presentations for 10 industries (healthcare, real estate, restaurants, retail, education, beauty, automotive, legal, construction, e-commerce)
- Add Gold Guarantee system (30-day full refund) with terms and conditions
- Add AI Sales Agents system: lead generation, WhatsApp/voice/email outreach, lead scoring, auto-booking
- Add backend: Affiliate & AI Conversation models, API endpoints, Celery worker tasks
- Update landing page with Gold Guarantee, Affiliate CTA, and AI Agents sections

https://claude.ai/code/session_01KnJgK7RwyeCvRZTRThHtfU
2026-03-30 15:49:58 +00:00

66 lines
1.9 KiB
Python

from celery import Celery
from app.config import get_settings
settings = get_settings()
celery_app = Celery(
"dealix",
broker=settings.REDIS_URL,
backend=settings.REDIS_URL,
include=[
"app.workers.follow_up_tasks",
"app.workers.message_tasks",
"app.workers.notification_tasks",
"app.workers.affiliate_tasks",
],
)
celery_app.conf.update(
task_serializer="json",
accept_content=["json"],
result_serializer="json",
timezone="Asia/Riyadh",
enable_utc=True,
task_track_started=True,
task_acks_late=True,
worker_prefetch_multiplier=1,
)
celery_app.conf.beat_schedule = {
"check-pending-followups": {
"task": "app.workers.follow_up_tasks.process_pending_followups",
"schedule": 300.0, # every 5 minutes
},
"send-scheduled-messages": {
"task": "app.workers.message_tasks.send_scheduled_messages",
"schedule": 60.0, # every minute
},
"daily-report": {
"task": "app.workers.notification_tasks.send_daily_report",
"schedule": {
"hour": 8,
"minute": 0,
},
},
"check-affiliate-targets": {
"task": "app.workers.affiliate_tasks.check_monthly_targets",
"schedule": 86400.0, # daily
},
"affiliate-weekly-report": {
"task": "app.workers.affiliate_tasks.send_affiliate_weekly_report",
"schedule": 604800.0, # weekly
},
"ai-lead-generation": {
"task": "app.workers.affiliate_tasks.ai_lead_generation_scan",
"schedule": 21600.0, # every 6 hours
},
"ai-outreach-followup": {
"task": "app.workers.affiliate_tasks.ai_outreach_followup",
"schedule": 1800.0, # every 30 minutes
},
"process-auto-bookings": {
"task": "app.workers.affiliate_tasks.process_auto_bookings",
"schedule": 900.0, # every 15 minutes
},
}