def METHOD_NAME(db_session: SessionLocal, project: Project):
    """Syncs active and stable incident tasks."""
    task_plugin = plugin_service.get_active_instance(
        db_session=db_session, project_id=project.id, plugin_type="task"
    )
    if not task_plugin:
        log.warning(
            f"Active and stable incident tasks sync skipped. No task plugin enabled. Project: {project.name}. Organization: {project.organization.name}"
        )
        return
    # we get all active and stable incidents
    active_incidents = incident_service.get_all_by_status(
        db_session=db_session, project_id=project.id, status=IncidentStatus.active
    )
    stable_incidents = incident_service.get_all_by_status(
        db_session=db_session, project_id=project.id, status=IncidentStatus.stable
    )
    incidents = active_incidents + stable_incidents
    lookback = 60 * 10  # 10 min
    sync_tasks(db_session, task_plugin, incidents, lookback=lookback, notify=True)