]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 9 Jun 2023 00:14:39 +0000 (02:14 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 9 Jun 2023 00:14:39 +0000 (02:14 +0200)
- github.com is not an instance, so let's not confuse some code somewhere

fba/commands.py

index c2bb7917c643f667d587704057e7d654c95fa095..56bc9ff0d9417f8d876488adb6373464b8635590 100644 (file)
@@ -290,14 +290,14 @@ def fetch_cs(args: argparse.Namespace):
 
             for row in domains[block_level]:
                 # DEBUG: print(f"DEBUG: row='{row}'")
-                if not instances.is_registered(row["domain"]):
-                    print(f"INFO: Fetching instances from domain='{row['domain']}' ...")
-                    fba.fetch_instances(row["domain"], None, None, inspect.currentframe().f_code.co_name)
-
                 if not blocks.is_instance_blocked('chaos.social', row["domain"], block_level):
                     # DEBUG: print(f"DEBUG: domain='{row['domain']}',block_level='{block_level}' blocked by chaos.social, adding ...")
                     blocks.add_instance('chaos.social', row["domain"], row["reason"], block_level)
 
+                if not instances.is_registered(row["domain"]):
+                    print(f"INFO: Fetching instances from domain='{row['domain']}' ...")
+                    fba.fetch_instances(row["domain"], 'chaos.social', None, inspect.currentframe().f_code.co_name)
+
         # DEBUG: print("DEBUG: Committing changes ...")
         fba.connection.commit()
 
@@ -456,6 +456,6 @@ def fetch_federater(args: argparse.Namespace):
                 continue
 
             print(f"INFO: Fetching instances for instane='{row['#domain']}' ...")
-            fba.fetch_instances(row["#domain"], 'github.com', None, inspect.currentframe().f_code.co_name)
+            fba.fetch_instances(row["#domain"], None, None, inspect.currentframe().f_code.co_name)
 
     # DEBUG: print("DEBUG: EXIT!")