kpn / py-timeexecution

Time Execution: record application metrics
https://pypi.org/project/timeexecution/
Apache License 2.0
12 stars 19 forks source link

FIX Make threaded backend multiprocess-safe #33

Closed eigenein closed 6 years ago

eigenein commented 6 years ago

IF we configure ThreadedBackend and use it for both an app and Celery worker, then metrics are not being sent from Celery tasks because queue.Queue doesn't work between processes.

Options considered:

codecov-io commented 6 years ago

Codecov Report

Merging #33 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #33   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           7      6    -1     
  Lines         180    180           
=====================================
  Hits          180    180
Impacted Files Coverage Δ
time_execution/backends/threaded.py 100% <100%> (ø) :arrow_up:
time_execution/backends/__init__.py

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 862e16f...d1b005a. Read the comment docs.

jeduden commented 6 years ago

What issue is fixed by this PR ? I.e why are two separate processes interferring with each other?

eigenein commented 6 years ago

@jeduden Updated the description.