24 Commits

Author SHA1 Message Date
Michael Zanetti
22bacf09e1 fix build 2019-12-01 01:14:26 +01:00
Michael Zanetti
212ccc8596 remove unneeded processQueue 2019-11-30 23:56:56 +01:00
Michael Zanetti
64a494e44a Fix tests that didn't wait long enough for log entries to be written 2019-11-28 20:47:55 +01:00
Michael Zanetti
619bbf76f3 don't use QSqlQuery at all outside the job queue
On some backends, such as MySQL, a prepare() call will access
the database
2019-11-28 14:20:37 +01:00
Michael Zanetti
c7dd26d525 cleanup, fix last tests 2019-11-16 00:44:08 +01:00
Michael Zanetti
73812df269 fix shutdown 2019-11-15 23:54:40 +01:00
Michael Zanetti
0ce99fc127 add some debugs 2019-11-15 23:37:52 +01:00
Michael Zanetti
f36eac080f fix duplicate query execution 2019-11-15 23:12:27 +01:00
Michael Zanetti
2361cc0473 Wait for the job queue to finish before shutting down 2019-11-15 18:34:20 +01:00
Michael Zanetti
3eac06de6e Threaded log database
This
a) makes the log db threaded by using QtConcurrent to run queries in a
different thread but still keeps ordering of the queries and always
only allows a single query at a time (QSql is not threadsafe). This fixes
removeDevice calls failing if we take more than $jsonprc_timeout to clean
a deleted device from the DB and keeps nymead responsive during that too.

b) generally improces performance of the system by not requiring operations
(emitting events, changing states) to wait for the sync log db entry to be
made.

c) drops some of the houskeeping code on nymea startup. While this will still
do log db housekeeping if the DB exceeds maxDbSize, it will not run
housekeeping on the DB any more at application startup. Reasoning for this
is that there have been reports of rules/log entries beimg destroyed if a
plugin can't be found at application startup. Given our general direction
of working towards more dynamic plugin loading, this might happen more often
in the future and we sure don't want to destroy rules etc when we just
temporarily miss a plugin.

d) tries to fix issue #226 by rotating the DB not only when it fails to open
initially, but also when it fails to insert new entries.
2019-11-15 18:33:10 +01:00
Michael Zanetti
aee554a1ee BrowserItemActions, yay! 2019-07-25 15:56:18 +02:00
Michael Zanetti
ff337bf8b6 Make browser item execution work async too 2019-07-25 15:56:18 +02:00
Michael Zanetti
b49dafa7e3 add limits and offset to GetLogEntries 2019-04-08 13:55:15 +02:00
Simon Stürz
dcd410457d Update core documentation and fix inline warnings 2019-04-08 13:55:15 +02:00
Michael Zanetti
23316942ce use bindValue for the log value filter 2019-04-08 13:55:15 +02:00
Michael Zanetti
8db7e050db Add support for configuring the used database backend 2019-04-08 13:55:15 +02:00
Michael Zanetti
b8c11cc850 improve debug output for the ruleengine 2019-04-08 13:55:15 +02:00
Michael Zanetti
67a535619f fix typos as reported by Krazy2 2019-04-08 13:55:15 +02:00
Michael Zanetti
79cc563eb0 docs guh -> nymea 2019-04-08 13:55:15 +02:00
Michael Zanetti
b8a86b095d copyright headers guh -> nymea 2019-04-08 13:55:15 +02:00
Michael Zanetti
36d4f89b24 namespace guhserver -> namespace nymeaserver 2019-04-08 13:55:15 +02:00
Michael Zanetti
da9fe61044 guhconfiguration -> nymeaconfiguration 2019-04-08 13:55:15 +02:00
Michael Zanetti
dca764fafd guhsettings -> nymeasettings 2019-04-08 13:55:15 +02:00
Michael Zanetti
4be14f1904 libguh-core -> libnymea-core 2019-04-08 13:55:15 +02:00