Skip to content

Commit 85c56df

Browse files
committed
Add worker max threads
1 parent d0139fc commit 85c56df

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

coreplugins/objdetect/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def detect(orthophoto, model, progress_callback=None):
1717
return {'error': "GeoDeep library is missing"}
1818

1919
try:
20-
return {'output': gdetect(orthophoto, model, output_type='geojson', progress_callback=progress_callback)}
20+
return {'output': gdetect(orthophoto, model, output_type='geojson', max_threads=settings.WORKERS_MAX_THREADS, progress_callback=progress_callback)}
2121
except Exception as e:
2222
return {'error': str(e)}
2323

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ drf-nested-routers==0.11.1
2121
funcsigs==1.0.2
2222
futures==3.1.1
2323
gunicorn==19.8.0
24-
geodeep==0.9.4
24+
geodeep==0.9.7
2525
itypes==1.1.0
2626
kombu==4.6.7
2727
Markdown==3.3.4

webodm/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,9 @@
384384
# are removed (or None to disable)
385385
CLEANUP_PARTIAL_TASKS = 72
386386

387+
# Maximum number of threads that a worker should use for processing
388+
WORKERS_MAX_THREADS = 1
389+
387390
# Link to GCP docs
388391
GCP_DOCS_LINK = "https://docs.opendronemap.org/gcp/#gcp-file-format"
389392

0 commit comments

Comments
 (0)