fix: emit only if data and marshal invalid metadata

* fix(emitter): only emit if there are log records

* fix(actions): marshal invalid metadata value into string
This commit is contained in:
Silvan
2023-03-01 18:05:12 +01:00
committed by GitHub
parent 966df56026
commit ed4983d3fd
3 changed files with 14 additions and 0 deletions

View File

@@ -49,6 +49,9 @@ func (l *databaseLogStorage) QuotaUnit() quota.Unit {
}
func (l *databaseLogStorage) Emit(ctx context.Context, bulk []logstore.LogRecord) error {
if len(bulk) == 0 {
return nil
}
builder := squirrel.Insert(accessLogsTable).
Columns(
accessTimestampCol,

View File

@@ -42,6 +42,9 @@ func (l *databaseLogStorage) QuotaUnit() quota.Unit {
}
func (l *databaseLogStorage) Emit(ctx context.Context, bulk []logstore.LogRecord) error {
if len(bulk) == 0 {
return nil
}
builder := squirrel.Insert(executionLogsTable).
Columns(
executionTimestampCol,