Skip to content

Commit 43535fa

Browse files
committed
work on easy comments
1 parent 7bbfafa commit 43535fa

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

mapswipe_workers/python_scripts/remove_duplicated_information_in_postgres.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ def get_project_ids_from_postgres():
88
p_con = auth.postgresDB()
99

1010
query = """
11-
SELECT project_id FROM projects
12-
LIMIT 10
11+
SELECT project_id FROM projects;
1312
"""
1413
data = p_con.retr_query(query)
15-
project_ids = []
16-
for item in data:
17-
project_ids.append(item[0])
14+
project_ids = [item[0] for item in data]
1815

1916
logger.info("Got projects from postgres.")
2017
logger.info(project_ids)
@@ -55,14 +52,6 @@ def update_groups_table(project_id: str):
5552
logger.info(f"Start process for project: '{project_id}'")
5653
p_con = auth.postgresDB()
5754

58-
# removing only the duplicated keys would be better
59-
"""
60-
select
61-
project_type_specifics::jsonb #- '{projectId}' #- '{groupId}'
62-
from tasks
63-
limit 10
64-
"""
65-
6655
query = """
6756
UPDATE groups
6857
SET project_type_specifics = project_type_specifics::jsonb

0 commit comments

Comments
 (0)