(executionData: ExecutionData)
| 257 | } |
| 258 | |
| 259 | function recordStoredByteSize(executionData: ExecutionData): { |
| 260 | executionData: ExecutionData |
| 261 | storedBytes?: number |
| 262 | } { |
| 263 | const firstBytes = getJsonByteSize(executionData) |
| 264 | if (firstBytes === undefined) { |
| 265 | return { executionData } |
| 266 | } |
| 267 | |
| 268 | const withFirstSize = { ...executionData, executionDataStoredBytes: firstBytes } |
| 269 | const secondBytes = getJsonByteSize(withFirstSize) |
| 270 | if (secondBytes === undefined || secondBytes === firstBytes) { |
| 271 | return { executionData: withFirstSize, storedBytes: secondBytes ?? firstBytes } |
| 272 | } |
| 273 | |
| 274 | const withSecondSize = { ...executionData, executionDataStoredBytes: secondBytes } |
| 275 | return { |
| 276 | executionData: withSecondSize, |
| 277 | storedBytes: getJsonByteSize(withSecondSize) ?? secondBytes, |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | async function setExecutionLogWriteTimeouts(trx: Pick<typeof db, 'execute'>): Promise<void> { |
| 282 | await trx.execute( |
no test coverage detected