Skip to content

Commit ea5d9e3

Browse files
committed
Linter
1 parent 507c20b commit ea5d9e3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

readthedocs/telemetry/tasks.py

+8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
"""Tasks related to telemetry."""
2+
13
from readthedocs.builds.models import Build
24
from readthedocs.telemetry.models import BuildData
35
from readthedocs.worker import app
46

57

68
@app.task(queue="web")
79
def save_build_data(build_id, data):
10+
"""
11+
Save the build data asynchronously.
12+
13+
Mainly used from the builders,
14+
since they don't have access to the database.
15+
"""
816
build = Build.objects.filter(id=build_id).first()
917
if build:
1018
BuildData.objects.collect(build, data)

0 commit comments

Comments
 (0)