Skip to content

Commit 4f45e2b

Browse files
committed
#2: Improve readability
1 parent 143ccf6 commit 4f45e2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ Read temperature every minute; distinct_until_changed - produce only if temperat
261261
data = rx\
262262
.interval(period=timedelta(seconds=60))\
263263
.pipe(ops.map(lambda t: sensor_temperature()),
264-
ops.map(lambda temperature: line_protocol(temperature)),
265-
ops.distinct_until_changed())
264+
ops.distinct_until_changed(),
265+
ops.map(lambda temperature: line_protocol(temperature)))
266266

267267
_db_client = InfluxDBClient(url="http://localhost:9999/api/v2", token="my-token-123", org="my-org", debug=True)
268268

influxdb2_test/iot_sensor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def line_protocol(temperature):
5959
data = rx\
6060
.interval(period=timedelta(seconds=60))\
6161
.pipe(ops.map(lambda t: sensor_temperature()),
62-
ops.map(lambda temperature: line_protocol(temperature)),
63-
ops.distinct_until_changed())
62+
ops.distinct_until_changed(),
63+
ops.map(lambda temperature: line_protocol(temperature)))
6464

6565
_db_client = InfluxDBClient(url="http://localhost:9999/api/v2", token="my-token-123", org="my-org", debug=True)
6666

0 commit comments

Comments
 (0)