Adding SQL limits
This commit is contained in:
@@ -7,6 +7,7 @@ services:
|
||||
container_name: thesillyhome
|
||||
image: lcmchris1/thesillyhome-container:dev
|
||||
restart: unless-stopped
|
||||
external: true
|
||||
volumes:
|
||||
- thesillyhome_config:/thesillyhome_src/data/config/
|
||||
ports:
|
||||
|
||||
@@ -77,7 +77,9 @@ class homedb:
|
||||
last_changed ,\
|
||||
last_updated ,\
|
||||
old_state_id \
|
||||
from states ORDER BY last_updated DESC;"
|
||||
from states \
|
||||
WHERE entity_id in ({str(tsh_config.devices)[1:-1]})\
|
||||
ORDER BY last_updated DESC LIMIT 100000;"
|
||||
with self.mydb.connect() as con:
|
||||
con = con.execution_options(stream_results=True)
|
||||
list_df = [
|
||||
|
||||
Reference in New Issue
Block a user