Skip to content

Commit

Permalink
Fix num_processes option
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-ueding committed Aug 14, 2024
1 parent 236846b commit b8bd6ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion geo_activity_playground/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Config:
heart_rate_maximum: Optional[int] = None
kinds_without_achievements: list[str] = dataclasses.field(default_factory=list)
metadata_extraction_regexes: list[str] = dataclasses.field(default_factory=list)
num_processes: Optional[int] = None
num_processes: Optional[int] = 1
privacy_zones: dict[str, list[list[float]]] = dataclasses.field(
default_factory=dict
)
Expand Down
2 changes: 1 addition & 1 deletion geo_activity_playground/importers/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def import_from_directory(

if num_processes == 1:
paths_with_errors = []
for path in tqdm(new_activity_paths, desc="Parse activity metadata"):
for path in tqdm(new_activity_paths, desc="Parse activity metadata (serially)"):
errors = _cache_single_file(path)
if errors:
paths_with_errors.append(errors)
Expand Down
2 changes: 1 addition & 1 deletion geo_activity_playground/webui/upload/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def scan_for_activities(
if pathlib.Path("Activities").exists():
import_from_directory(
config.metadata_extraction_regexes,
None,
config.num_processes,
)
if pathlib.Path("Strava Export").exists():
import_from_strava_checkout()
Expand Down

0 comments on commit b8bd6ea

Please sign in to comment.