Add log export for audit logs and SCIM events
Route audit-log and SCIM-event exports through export_jobs with typed arguments, an iam BuildAndUploadExport/SendExportEmail implementation, and a concurrent export-job worker with stale recovery. Stream JSONL via page.WalkAll into S3, and expose the request flow on console, connect, MCP, and CLI. Co-authored-by: Bryan Frimin <bryan@getprobo.com> Signed-off-by: Sacha Al Himdani <sacha@probo.com>
This commit is contained in:
@@ -1218,19 +1218,12 @@ func (impl *Implm) runExportJob(
|
||||
proboService *probo.Service,
|
||||
l *log.Logger,
|
||||
) error {
|
||||
LOOP:
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return ctx.Err()
|
||||
case <-time.After(30 * time.Second):
|
||||
if err := proboService.ExportJob(ctx); err != nil {
|
||||
if !errors.Is(err, coredata.ErrNoExportJobAvailable) {
|
||||
l.ErrorCtx(ctx, "cannot process export job", log.Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
goto LOOP
|
||||
}
|
||||
return probo.NewExportJobWorker(
|
||||
proboService,
|
||||
l,
|
||||
probo.ExportJobWorkerConfig{},
|
||||
worker.WithMaxConcurrency(3),
|
||||
).Run(ctx)
|
||||
}
|
||||
|
||||
func (impl *Implm) runApiServer(
|
||||
|
||||
Reference in New Issue
Block a user