mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd:Ⓜ️:events: Log errors and attempt to continue dump loop.
This commit is contained in:
parent
7a5bb70f16
commit
be955faf2d
1 changed files with 18 additions and 1 deletions
|
@ -104,7 +104,7 @@ ircd::m::events::dump__file(const string_view &filename)
|
|||
|
||||
char *pos{data(buf)};
|
||||
size_t foff{0}, ecount{0}, acount{0}, errcount{0};
|
||||
for(auto it(begin(dbs::event_json)); it; ++it)
|
||||
for(auto it(begin(dbs::event_json)); it; ++it) try
|
||||
{
|
||||
const event::idx seq
|
||||
{
|
||||
|
@ -156,6 +156,23 @@ ircd::m::events::dump__file(const string_view &filename)
|
|||
}
|
||||
}
|
||||
}
|
||||
catch(const ctx::interrupted &)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
++errcount;
|
||||
log::error
|
||||
{
|
||||
"dump[%s] events; %s in %zu writes; %zu errors :%s",
|
||||
filename,
|
||||
ecount,
|
||||
acount,
|
||||
errcount,
|
||||
e.what(),
|
||||
};
|
||||
}
|
||||
|
||||
if(pos > data(buf))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue