If I have two "headless" workers (one

If I have two "headless" workers (one scheduled, one acting as an internal database proxy) communicating only via Service Binding, can someone possibly give me an example of calling an RPC method that's in one worker where one of the method parameters is a ReadableStream? The data I'm sending from the scheduled worker (a large array of arrays) to the database worker is greater than 1mb and it was recommended, in order to get past the 1mb limit of parameter value size, to use a ReadableStream to pass the data to the RPC method. I just can't find any good example of doing this anywhere and I'm totally new to streams. I'm just not sure how to do this and could use some help if anyone has experience doing this.
1 Reply
Murder Chicken
The data structure is simple (just a lot of elements) and looks like this:
[
[132323, '2024-12-01', 'VALID'],
[433323, '2024-12-02', 'INVALID'],
[345233, '2024-12-03', 'VALID'],
... (50k + records)
]
[
[132323, '2024-12-01', 'VALID'],
[433323, '2024-12-02', 'INVALID'],
[345233, '2024-12-03', 'VALID'],
... (50k + records)
]
Managed to figure this out. For anyone interested: https://discordapp.com/channels/595317990191398933/1288258448626290771
Want results from more Discord servers?
Add your server