throw update

This commit is contained in:
Green Sky 2024-03-15 14:51:30 +01:00
parent 2772c8ee69
commit 318be9cd62
No known key found for this signature in database

View File

@ -453,6 +453,11 @@ bool MessageFragmentStore::syncFragToStorage(FragmentHandle fh, Message3Registry
//nlohmann::json::to_msgpack(j); //nlohmann::json::to_msgpack(j);
auto j_dump = j.dump(2, ' ', true); auto j_dump = j.dump(2, ' ', true);
if (_fs.syncToStorage(fh, reinterpret_cast<const uint8_t*>(j_dump.data()), j_dump.size())) { if (_fs.syncToStorage(fh, reinterpret_cast<const uint8_t*>(j_dump.data()), j_dump.size())) {
// TODO: make this better, should this be called on fail? should this be called before sync? (prob not)
_fs_ignore_event = true;
_fs.throwEventUpdate(fh);
_fs_ignore_event = false;
//std::cout << "MFS: dumped " << j_dump << "\n"; //std::cout << "MFS: dumped " << j_dump << "\n";
// succ // succ
return true; return true;