mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-10 23:48:09 -05:00
improvement(console): increase console max entries for larger workflows (#1032)
* improvement(console): increase console max entries for larger workflows * increase safety limit for infinite loops
This commit is contained in:
committed by
Siddharth Ganesan
parent
9aa1fe8037
commit
69773c3174
@@ -807,7 +807,7 @@ export function useWorkflowExecution() {
|
||||
|
||||
// Continue execution until there are no more pending blocks
|
||||
let iterationCount = 0
|
||||
const maxIterations = 100 // Safety to prevent infinite loops
|
||||
const maxIterations = 500 // Safety to prevent infinite loops
|
||||
|
||||
while (currentPendingBlocks.length > 0 && iterationCount < maxIterations) {
|
||||
logger.info(
|
||||
|
||||
@@ -225,7 +225,7 @@ export class Executor {
|
||||
|
||||
let hasMoreLayers = true
|
||||
let iteration = 0
|
||||
const maxIterations = 100 // Safety limit for infinite loops
|
||||
const maxIterations = 500 // Safety limit for infinite loops
|
||||
|
||||
while (hasMoreLayers && iteration < maxIterations && !this.isCancelled) {
|
||||
const nextLayer = this.getNextExecutionLayer(context)
|
||||
|
||||
@@ -4,7 +4,7 @@ import { redactApiKeys } from '@/lib/utils'
|
||||
import type { NormalizedBlockOutput } from '@/executor/types'
|
||||
import type { ConsoleEntry, ConsoleStore } from '@/stores/panel/console/types'
|
||||
|
||||
const MAX_ENTRIES = 50 // MAX across all workflows
|
||||
const MAX_ENTRIES = 500 // MAX across all workflows - allows for 100 loop iterations + other workflow logs
|
||||
const MAX_IMAGE_DATA_SIZE = 1000 // Maximum size of image data to store (in characters)
|
||||
const MAX_ANY_DATA_SIZE = 5000 // Maximum size of any data to store (in characters)
|
||||
const MAX_TOTAL_ENTRY_SIZE = 50000 // Maximum size of entire entry to prevent localStorage overflow
|
||||
|
||||
@@ -109,7 +109,7 @@ describe('workflow store', () => {
|
||||
expect(state.loops.loop1.forEachItems).toEqual(['item1', 'item2', 'item3'])
|
||||
})
|
||||
|
||||
it('should clamp loop count between 1 and 50', () => {
|
||||
it('should clamp loop count between 1 and 100', () => {
|
||||
const { addBlock, updateLoopCount } = useWorkflowStore.getState()
|
||||
|
||||
// Add a loop block
|
||||
@@ -199,7 +199,7 @@ describe('workflow store', () => {
|
||||
expect(parsedDistribution).toHaveLength(3)
|
||||
})
|
||||
|
||||
it('should clamp parallel count between 1 and 50', () => {
|
||||
it('should clamp parallel count between 1 and 20', () => {
|
||||
const { addBlock, updateParallelCount } = useWorkflowStore.getState()
|
||||
|
||||
// Add a parallel block
|
||||
|
||||
Reference in New Issue
Block a user