Skip to content

Set/Get Progress from Code

By default, Orvanta monitors only job start and completion without tracking intermediate progress, displaying 0% and 100% completion. For long-running scripts, this feature enables direct progress reporting from code.

Progress range: The set_progress function reports progress as a percentage between 0 and 99. Values are clamped — anything below 0 becomes 0, and anything above 99 becomes 99.

Incremental only: The progress value can only be increased, not decreased. This ensures that the progress bar always moves forward and never reverses.

UI behavior: When previewing an individual job, a progress bar will appear after 5 seconds of execution (if the set_progress function is used) or immediately for flows.

from orvanta import set_progress
def main():
# ... First heavy task
set_progress(25)
# ... Second heavy task
set_progress(50)
# ... Third heavy task
set_progress(75)
# ... Fourth heavy task
set_progress(99)
import { setProgress } from 'orvanta-client';
export async function main() {
// ... First heavy task
setProgress(25)
// ... Second heavy task
setProgress(50)
// ... Third heavy task
setProgress(75)
// ... Fourth heavy task
setProgress(99)
}