We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 507c20b commit ea5d9e3Copy full SHA for ea5d9e3
readthedocs/telemetry/tasks.py
@@ -1,10 +1,18 @@
1
+"""Tasks related to telemetry."""
2
+
3
from readthedocs.builds.models import Build
4
from readthedocs.telemetry.models import BuildData
5
from readthedocs.worker import app
6
7
8
@app.task(queue="web")
9
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
16
build = Build.objects.filter(id=build_id).first()
17
if build:
18
BuildData.objects.collect(build, data)
0 commit comments