File size: 2,884 Bytes
e5724fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    # AmalOffload v6 — Fix Pack

    تم إنشاء نسخة مُرقّعة من المشروع مع إصلاحات أساسية تمنع الأعطال الفورية وتسهّل التشغيل.

    ## ما الذي تم إصلاحه؟
    - autostart_config.py: dedup import of PORT
- background_service.py: dedup import of PORT
- central_manager.py: dedup import of PORT
- control.py: dedup import of PORT
- dashboard.py: dedup import of PORT
- DeviceManager.py: dedup import of PORT
- distributed_executor.py: dedup import of PORT
- dts_cli.py: dedup import of PORT
- enhanced_assistant.py: dedup import of PORT
- external_server.py: dedup import of PORT
- internet_scanner.py: dedup import of PORT
- launcher.py: dedup import of PORT
- live_streaming.py: dedup import of PORT
- load_balancer.py: dedup import of PORT
- peer_registry.py: dedup import of PORT
- peer_server.py: dedup import of PORT
- remote_executor.py: dedup import of PORT
- rpc_server.py: dedup import of PORT
- security_layer.py: dedup import of PORT
- server.py: dedup import of PORT
- smart_tasks.py: dedup import of PORT
- system_check.py: dedup import of PORT
- system_tray.py: dedup import of PORT
- task_splitter.py: dedup import of PORT
- test_distributed_system.py: dedup import of PORT
- test_monitor.py: dedup import of PORT
- video_processing.py: dedup import of PORT
- your_tasks.py: dedup import of PORT
- control.py: fixed broken import line
- dts_cli.py: rewritten to a minimal, valid CLI
- ram_manager.py: removed BOM
- templates/dashboard.html: created from index.html
- config.py: added as a single source of truth for PORT

    ## توصيات إضافية (يدويّة)
    - أضِف `fastapi` و`uvicorn` إلى `requirements.txt` إذا أردت تشغيل `central_manager.py` (يستخدم FastAPI).
    - وحّد استيراد المنفذ عبر:
      ```python
      from config import PORT
      ```
      واستبدل أي استخدام لـ `from peer_discovery import PORT, PORT` أو `CPU_PORT` حسب الحاجة.
    - إن ظهرت مشكلة `TemplateNotFound: dashboard.html` فقد تم إنشاء `templates/dashboard.html` تلقائياً.
    - يُفضّل تنظيف `requirements.txt` من التكرارات (انظر التوصيات في تقرير التدقيق).
    - اختر نقطة دخول واحدة للمشروع (مثلاً: `launcher.py` أو `startup.py`) وتجنّب تشغيل أكثر من خادم في نفس العملية.

    ## التشغيل السريع المقترح
    1) ثبّت المتطلبات (الأساسية فقط):
       ```bash
       pip install flask flask_cors flask_socketio requests psutil zeroconf cryptography numpy networkx GPUtil python-dotenv
       ```
    2) شغّل الـ Dashboard وخادم RPC معاً:
       ```bash
       python dts_cli.py start
       ```

    بالتوفيق!