
















loop (Rust), or while (true)


!inline <path of lock>. We had numerous feedback from EE customers that the lockfile were hard to diff and added lots of boilerplate to otherwise clean yaml filesmyapp.yaml -> myapp.app/app.yaml + myapp.app/inline_script1.ts + myapp.app/inline_script1.lock + ....
wmill.JobService.listJobs(...)) doesn't require to use setClient prior anymorewmill sync pull as a consequence. It's an annoying but necessary last migration.





loopwhile (true)!inline <path of lock>myapp.yaml -> myapp.app/app.yaml + myapp.app/inline_script1.ts + myapp.app/inline_script1.lock + ....import * as wmill from './windmill.ts'wmill.JobService.listJobs(...)wmill sync pullfrom wmill import task
import pandas as pd
import numpy as np
# The pin is important since task is a decorator available only from 1.286.2
#extra_requirements:
#wmill>=1.286.2
##You can specify tag to run the task on a specific type of worker
@task(tag="highmem")
def heavy_compute(n: int):
df = pd.DataFrame(np.random.randn(100, 4), columns=list('ABCD'))
return df.sum().sum()
@task
def send_result(res: int, email: str):
# logs of the subtask are available in the main task logs
print(f"Sending result {res} to {email}")
return "OK"
def main(n: int):
l = []
# to run things in parallel, simply use multiprocessing Pool map instead: https://docs.python.org/3/library/multiprocessing.html
for i in range(n):
l.append(heavy_compute(i))
print(l)
return send_result(sum(l), "example@example.com")import * as wmill from "windmill-client@1.297.0"
export async function main(x: string) {
await wmill.setFlowUserState("FOO", 42)
return await wmill.getFlowUserState("FOO")
}import wmill
#extra_requirements:
#wmill==1.297.0
def main(x: str):
wmill.set_flow_user_state("foobar", 43)
return wmill.get_flow_user_state("foobar")