43 lines
1.2 KiB
Markdown
43 lines
1.2 KiB
Markdown
# Schritt 7: Feature Lifecycle (optional)
|
|
|
|
[← Zurück: Environment-Konfiguration](07-environment.md) | [Weiter: Datenbank-Schema →](09-database-schema.md)
|
|
|
|
**Datei:** `modules/features/featuresLifecycle.py`
|
|
|
|
Falls Ihr Feature Hintergrundprozesse oder Initialisierung beim Start benötigt, können Sie diese hier hinzufügen:
|
|
|
|
```python
|
|
async def start() -> None:
|
|
""" Start feature triggers and background managers """
|
|
|
|
# Provide Event User
|
|
rootInterface = getRootInterface()
|
|
eventUser = rootInterface.getUserByUsername("event")
|
|
|
|
# ... existing features ...
|
|
|
|
# Feature RealEstate (optional)
|
|
# from modules.features.realEstate import mainRealEstate
|
|
# mainRealEstate.initializeFeature(eventUser)
|
|
# logger.info("Real Estate feature initialized")
|
|
|
|
return True
|
|
|
|
|
|
async def stop() -> None:
|
|
""" Stop feature triggers and background managers """
|
|
|
|
# Feature RealEstate cleanup (optional)
|
|
# from modules.features.realEstate import mainRealEstate
|
|
# mainRealEstate.cleanupFeature()
|
|
# logger.info("Real Estate feature cleaned up")
|
|
|
|
return True
|
|
```
|
|
|
|
---
|
|
|
|
[← Zurück: Environment-Konfiguration](07-environment.md) | [Weiter: Datenbank-Schema →](09-database-schema.md)
|
|
|
|
|
|
|