mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Another fix for uptime logging.
This commit is contained in:
parent
ef224c3547
commit
192e5dbff8
2 changed files with 8 additions and 2 deletions
|
@ -233,12 +233,12 @@ RethinkDB::RethinkDB(EmbeddedNetworkController *const nc,const Address &myAddres
|
||||||
tmpobj["ts"] = i->second;
|
tmpobj["ts"] = i->second;
|
||||||
batch.emplace_back(tmpobj);
|
batch.emplace_back(tmpobj);
|
||||||
if (batch.size() >= 256) {
|
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();
|
batch.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (batch.size() > 0)
|
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();
|
_lastOnline.clear();
|
||||||
}
|
}
|
||||||
} catch (std::exception &e) {
|
} catch (std::exception &e) {
|
||||||
|
|
|
@ -28,6 +28,12 @@
|
||||||
namespace ZeroTier
|
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
|
class RethinkDB : public DB
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Add table
Reference in a new issue