diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-11-08 20:02:10 -0500 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-11-08 20:02:10 -0500 |
commit | 192e5dbff8d86c77c0b7a47ba5d65e3b6599e0de (patch) | |
tree | 731c8ab78f2d54c080e792aaffd693f22f320f91 /controller | |
parent | ef224c3547b31e8a9aecad7750487e09d68e00f0 (diff) | |
download | infinitytier-192e5dbff8d86c77c0b7a47ba5d65e3b6599e0de.tar.gz infinitytier-192e5dbff8d86c77c0b7a47ba5d65e3b6599e0de.zip |
Another fix for uptime logging.
Diffstat (limited to 'controller')
-rw-r--r-- | controller/RethinkDB.cpp | 4 | ||||
-rw-r--r-- | controller/RethinkDB.hpp | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/controller/RethinkDB.cpp b/controller/RethinkDB.cpp index 2da55177..6583f23c 100644 --- a/controller/RethinkDB.cpp +++ b/controller/RethinkDB.cpp @@ -233,12 +233,12 @@ RethinkDB::RethinkDB(EmbeddedNetworkController *const nc,const Address &myAddres tmpobj["ts"] = i->second; batch.emplace_back(tmpobj); if (batch.size() >= 256) { - R::db(this->_db).table("MemberLastRequest",R::optargs("read_mode","outdated")).insert(R::args(batch),R::optargs("conflict","update")).run(*rdb); + R::db(this->_db).table("MemberLastRequest",R::optargs("read_mode","outdated")).insert(batch,R::optargs("conflict","update")).run(*rdb); batch.clear(); } } if (batch.size() > 0) - R::db(this->_db).table("MemberLastRequest",R::optargs("read_mode","outdated")).insert(R::args(batch),R::optargs("conflict","update")).run(*rdb); + R::db(this->_db).table("MemberLastRequest",R::optargs("read_mode","outdated")).insert(batch,R::optargs("conflict","update")).run(*rdb); _lastOnline.clear(); } } catch (std::exception &e) { diff --git a/controller/RethinkDB.hpp b/controller/RethinkDB.hpp index 561cbdab..26987019 100644 --- a/controller/RethinkDB.hpp +++ b/controller/RethinkDB.hpp @@ -28,6 +28,12 @@ namespace ZeroTier { +/** + * A controller database driver that talks to RethinkDB + * + * This is for use with ZeroTier Central. Others are free to build and use it + * but be aware that we might change it at any time. + */ class RethinkDB : public DB { public: |