definy.sync-local-events
- description
- All events of this server (newest first)
- type
Fn( offset: Number, acc: List<@definy.stored-event>, then: Fn(events: List<@definy.stored-event>) -> @definy.service-io ) -> @definy.service-io
- expression
fn(offset$0, acc$1, then$2) => @definy.store-read-events-page( event_type: #none, limit: 500, offset: $0, then: fn(events$3) => let all$4 = @core.list-concat(left: $1, right: $3); match @core.less-than(left: @core.list-length(value: $3), right: 500) { true => $2(events: $4), false => @definy.sync-local-events( offset: @core.plus(left: $0, right: 500), acc: $4, then: fn(events$5) => $2(events: $5) ) } )
- visibility
- public
definy.sync-local-events (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo) id: GJnRoPDWl0DvxqSu9c-FKI4czPR8jhgkfBu8xXcl1lw content hash: 1veftJcEcADdww4EAtRrBBIevdbajK4LXnXTDLqYZxo