{#if sameWorker}
{SAME_WORKER_INCOMPATIBLE_MSG} Disable `Same Worker` in the flow settings to use a sleep.
{/if}
{
if (isSleepEnabled && flowModule.sleep != undefined) {
flowModule.sleep = undefined
} else {
flowModule.sleep = stepSettingDefaults('sleep')
}
}}
options={{
right: 'Sleep after step',
rightTooltip:
'At the end of the step, the flow sleeps for a number of seconds before scheduling the next job (no effect if the step is the last one).',
rightDocumentationLink: 'https://www.windmill.dev/docs/flows/sleep'
}}
/>
{#if flowModule.sleep && schema.properties['sleep'] && !sameWorker}
{
editor?.insertAtCursor(detail)
editor?.focus()
}}
>
{/if}