feat: Logs filtering, and log queue with group concurrency
This commit is contained in:
commit
d9c8cfb573
|
|
@ -194,11 +194,27 @@ async function handleConfigChangedEvent (j) {
|
|||
window.dispatchEvent(j)
|
||||
}
|
||||
|
||||
const eventCaseToTypeName = {
|
||||
entityChanged: 'EventEntityChanged',
|
||||
configChanged: 'EventConfigChanged',
|
||||
executionFinished: 'EventExecutionFinished',
|
||||
executionStarted: 'EventExecutionStarted',
|
||||
outputChunk: 'EventOutputChunk',
|
||||
heartbeat: 'EventHeartbeat'
|
||||
}
|
||||
|
||||
function handleEvent (msg) {
|
||||
const typeName = msg.event.value.$typeName.replace('olivetin.api.v1.', '')
|
||||
const eventCase = msg?.event?.case
|
||||
const eventValue = msg?.event?.value
|
||||
const typeName = eventCaseToTypeName[eventCase]
|
||||
|
||||
if (!typeName || !eventValue) {
|
||||
console.warn('Skipping websocket event with no payload:', msg)
|
||||
return
|
||||
}
|
||||
|
||||
const j = new Event(typeName)
|
||||
j.payload = msg.event.value
|
||||
j.payload = eventValue
|
||||
|
||||
switch (typeName) {
|
||||
case 'EventConfigChanged':
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -378,6 +378,8 @@ func (api *oliveTinAPI) internalLogEntryToPb(logEntry *executor.InternalLogEntry
|
|||
Output: logEntry.Output,
|
||||
TimedOut: logEntry.TimedOut,
|
||||
Blocked: logEntry.Blocked,
|
||||
Queued: logEntry.Queued,
|
||||
QueuedForGroup: logEntry.QueuedForGroup,
|
||||
ExitCode: logEntry.ExitCode,
|
||||
Tags: logEntry.Tags,
|
||||
ExecutionTrackingId: logEntry.ExecutionTrackingID,
|
||||
|
|
@ -385,8 +387,6 @@ func (api *oliveTinAPI) internalLogEntryToPb(logEntry *executor.InternalLogEntry
|
|||
ExecutionFinished: logEntry.ExecutionFinished,
|
||||
User: logEntry.Username,
|
||||
BindingId: logEntry.GetBindingId(),
|
||||
Queued: logEntry.Queued,
|
||||
QueuedForGroup: logEntry.QueuedForGroup,
|
||||
DatetimeRateLimitExpires: calculateRateLimitExpires(api, logEntry),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue