mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
modules/client/sync: Tweak log message format; cleanup longpoll::accepted struct.
This commit is contained in:
parent
2158d3e7b6
commit
9ab3549660
2 changed files with 35 additions and 33 deletions
|
@ -400,10 +400,10 @@ try
|
|||
|
||||
log::debug
|
||||
{
|
||||
log, "request %s linear last:%lu complete:%b @%lu",
|
||||
log, "request %s linear last:%lu %s@%lu",
|
||||
loghead(data),
|
||||
last,
|
||||
completed,
|
||||
completed? "complete "_sv : string_view{},
|
||||
next
|
||||
};
|
||||
|
||||
|
@ -665,7 +665,7 @@ ircd::m::sync::longpoll::handle(data &data,
|
|||
|
||||
log::debug
|
||||
{
|
||||
log, "request %s longpoll got:%lu complete @%lu",
|
||||
log, "request %s longpoll hit:%lu complete @%lu",
|
||||
loghead(data),
|
||||
event.event_idx,
|
||||
next
|
||||
|
|
|
@ -34,9 +34,21 @@ namespace ircd::m::sync
|
|||
|
||||
namespace ircd::m::sync::longpoll
|
||||
{
|
||||
struct accepted
|
||||
:m::event
|
||||
{
|
||||
struct accepted;
|
||||
|
||||
size_t polling {0};
|
||||
std::deque<accepted> queue;
|
||||
ctx::dock dock;
|
||||
|
||||
static bool handle(data &, const args &, const accepted &);
|
||||
static bool poll(data &, const args &);
|
||||
static void handle_notify(const m::event &, m::vm::eval &);
|
||||
extern m::hookfn<m::vm::eval &> notified;
|
||||
}
|
||||
|
||||
struct ircd::m::sync::longpoll::accepted
|
||||
:m::event
|
||||
{
|
||||
json::strung strung;
|
||||
std::string client_txnid;
|
||||
event::idx event_idx;
|
||||
|
@ -63,17 +75,7 @@ namespace ircd::m::sync::longpoll
|
|||
|
||||
accepted(accepted &&) = default;
|
||||
accepted(const accepted &) = delete;
|
||||
};
|
||||
|
||||
size_t polling {0};
|
||||
std::deque<accepted> queue;
|
||||
ctx::dock dock;
|
||||
|
||||
static bool handle(data &, const args &, const accepted &);
|
||||
static bool poll(data &, const args &);
|
||||
static void handle_notify(const m::event &, m::vm::eval &);
|
||||
extern m::hookfn<m::vm::eval &> notified;
|
||||
}
|
||||
};
|
||||
|
||||
struct ircd::m::sync::args
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue