diff --git a/core/controllers/ClientController.py b/core/controllers/ClientController.py index 7be4a62..ce55241 100644 --- a/core/controllers/ClientController.py +++ b/core/controllers/ClientController.py @@ -156,40 +156,40 @@ class ClientController: return path - @staticmethod - def __sync(changed_tables: list, client_observer: Optional[ClientObserver] = None, proxies: Optional[dict] = None): + # @staticmethod + # def __sync(changed_tables: list, client_observer: Optional[ClientObserver] = None, proxies: Optional[dict] = None): - if "applications" in changed_tables: - logger.info("Sync applications..") - if client_observer is not None: - client_observer.notify('synchronizing', 'Fetching Browser List..') - # noinspection PyProtectedMember - ApplicationController._sync(proxies=proxies) + # if "applications" in changed_tables: + # logger.info("Sync applications..") + # if client_observer is not None: + # client_observer.notify('synchronizing', 'Fetching Browser List..') + # # noinspection PyProtectedMember + # ApplicationController._sync(proxies=proxies) - if "application_versions" in changed_tables: - logger.info("Sync Application Versions..") - if client_observer is not None: - client_observer.notify('synchronizing', 'Fetching Browser Version List..') - # noinspection PyProtectedMember - ApplicationVersionController._sync(proxies=proxies) + # if "application_versions" in changed_tables: + # logger.info("Sync Application Versions..") + # if client_observer is not None: + # client_observer.notify('synchronizing', 'Fetching Browser Version List..') + # # noinspection PyProtectedMember + # ApplicationVersionController._sync(proxies=proxies) - if "client_version" in changed_tables: - logger.info("Sync of client version") - if client_observer is not None: - client_observer.notify('synchronizing', 'Fetching Client Version List..') - # noinspection PyProtectedMember - ClientVersionController._sync(proxies=proxies) + # if "client_version" in changed_tables: + # logger.info("Sync of client version") + # if client_observer is not None: + # client_observer.notify('synchronizing', 'Fetching Client Version List..') + # # noinspection PyProtectedMember + # ClientVersionController._sync(proxies=proxies) - if "subscriptions" in changed_tables: - logger.info("Sync of Subscriptions") - if client_observer is not None: - client_observer.notify('synchronizing', 'Fetching Subscription List..') - # noinspection PyProtectedMember - SubscriptionPlanController._sync(proxies=proxies) + # if "subscriptions" in changed_tables: + # logger.info("Sync of Subscriptions") + # if client_observer is not None: + # client_observer.notify('synchronizing', 'Fetching Subscription List..') + # # noinspection PyProtectedMember + # SubscriptionPlanController._sync(proxies=proxies) - ConfigurationController.update_last_synced_at() + # ConfigurationController.update_last_synced_at() - logger.info("Real Data Fetch Completed Successfully") + # logger.info("Real Data Fetch Completed Successfully") @staticmethod def __update(client_observer: Optional[ClientObserver] = None, proxies: Optional[dict] = None): diff --git a/core/controllers/LocationController.py b/core/controllers/LocationController.py index 28ffbeb..0959101 100644 --- a/core/controllers/LocationController.py +++ b/core/controllers/LocationController.py @@ -22,21 +22,6 @@ class LocationController: print(critical_error) return None - - # with get_session() as session: - # location_object = session.execute( - # select(Location) - # .where((Location.country_code == country_code) & (Location.code == city_code)) - # .options(joinedload(Location.operator)) - # ).scalar_one_or_none() - - # return location_object - - # legacy: - # Location.find(country_code, code) - - - @staticmethod def get_all(): with get_session() as session: @@ -45,18 +30,3 @@ class LocationController: .options(joinedload(Location.operator)) ).scalars().all() return all_records - - # legacy: - # return Location.all() - - -# Deprecated legacy sync, - -# from core.services.WebServiceApiService import WebServiceApiService - # @staticmethod - # def _sync(proxies: Optional[dict] = None): - - # locations = WebServiceApiService.get_locations(proxies) - - # Location.truncate() - # Location.save_many(locations) diff --git a/core/controllers/profile_state/update_profile.py b/core/controllers/profile_state/update_profile.py index f655eb8..7d41975 100644 --- a/core/controllers/profile_state/update_profile.py +++ b/core/controllers/profile_state/update_profile.py @@ -52,8 +52,6 @@ def update_profile( error_msg = f"Invalid profile id of {profile_id}" return Result(valid=False, message=error_msg, error_type=ResultError.INVALID_INPUT) - # logger.info(f"[UPDATE PROFILE] Found a relevant profile {profile_id}.") - if key == 'dimentions': profile.resolution = new_value @@ -84,10 +82,6 @@ def update_profile( # SQLAlchemy foreign key assignment — fills in id, timezone, operator, etc. profile.application_version = application_version - # legacy: - # profile.application_version.application_code = browser_type - # profile.application_version.version_number = browser_version - elif key == 'protocol': # ============= SAME VALUE ============= if profile.connection.code == new_value: diff --git a/core/services/networking/systemwide/encrypted_proxy/singbox_runner.py b/core/services/networking/systemwide/encrypted_proxy/singbox_runner.py index 558aeea..9f33337 100644 --- a/core/services/networking/systemwide/encrypted_proxy/singbox_runner.py +++ b/core/services/networking/systemwide/encrypted_proxy/singbox_runner.py @@ -258,7 +258,7 @@ def start_singbox( logger.info(f"Is the interface up? {interface_up}") if interface_up: - logger.info("INTERFACE IS UP") + logger.info("Interface is confirmed to be Up") else: logger.error("Interface is DOWN") return Result(valid=False, error_type=ResultError.INTERFACE, data=process_id)