File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
mapswipe_workers/python_scripts Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ def get_projects(status):
1919
2020
2121def filter_projects_by_name_and_progress (projects , filter_string , progress_threshold ):
22- """Load 'active' projects from Firebase ."""
22+ """Filter projects by name (lowercase) and progress ."""
2323 selected_project_ids = []
2424 for project_id in projects .keys ():
2525 name = projects [project_id ]["name" ]
2626 progress = projects [project_id ]["progress" ]
27- if filter_string in name and progress >= progress_threshold :
27+ if filter_string . lower () in name . lower () and progress >= progress_threshold :
2828 selected_project_ids .append (project_id )
2929
3030 logger .info (
@@ -78,7 +78,9 @@ def run_update_project_status(filter_string):
7878
7979
8080if __name__ == "__main__" :
81- """Check if project status should be updated and change value in Firebase."""
81+ """Use this command to run in docker container.
82+ docker-compose run -d mapswipe_workers_creation python3 python_scripts/update_project_status.py "test" 30 # noqa
83+ """
8284 try :
8385 filter_string = sys .argv [1 ]
8486 time_interval = int (sys .argv [2 ])
You can’t perform that action at this time.
0 commit comments