Cody Scandore
09/12/2023, 6:50 PMDavid Espejo (he/him)
09/12/2023, 7:49 PMCody Scandore
09/12/2023, 7:50 PM-latest
-------------------------- ----------------------------------- ------ ------- ---------- -------- ---------
| VERSION | NAME | TYPE | STATE | SCHEDULE | INPUTS | OUTPUTS |
-------------------------- ----------------------------------- ------ ------- ---------- -------- ---------
| 9xlF6CkNO1rB46vBvlGNuA== | schedule_test.print_time_workflow | | | | | o0 |
-------------------------- ----------------------------------- ------ ------- ---------- -------- ---------
1 rows
David Espejo (he/him)
09/12/2023, 7:52 PMCody Scandore
09/12/2023, 7:53 PMcron_lp_every_min_of_hour = LaunchPlan.get_or_create(
name="my_cron_scheduled_lp",
workflow=print_time_workflow,
schedule=CronSchedule(schedule="*/5 * * * *")
)
David Espejo (he/him)
09/12/2023, 7:56 PMCody Scandore
09/12/2023, 7:56 PMDavid Espejo (he/him)
09/12/2023, 8:00 PMCody Scandore
09/12/2023, 8:03 PMKetan (kumare3)
Cody Scandore
09/13/2023, 1:23 AMKetan (kumare3) [8:50 PM]
You just have to activate the scheduleIs there anything in addition to registering the launchplan and then
flytectl update launchplan ... --activate
?Ketan (kumare3)
Cody Scandore
09/13/2023, 2:15 PM2023/09/13 14:14:31 /go/pkg/mod/gorm.io/gorm@v1.24.1-0.20221019064659-5dd2bb482755/callbacks.go:134
[0.946ms] [rows:0] SELECT * FROM "schedulable_entities"
{"json":{"src":"composite_workqueue.go:88"},"level":"debug","msg":"Subqueue handler batch round","ts":"2023-09-13T14:14:32Z"}
{"json":{"src":"composite_workqueue.go:98"},"level":"debug","msg":"Dynamically configured batch size [-1]","ts":"2023-09-13T14:14:32Z"}
{"json":{"src":"composite_workqueue.go:129"},"level":"debug","msg":"Exiting SubQueue handler batch round","ts":"2023-09-13T14:14:32Z"}
{"json":{"src":"composite_workqueue.go:88"},"level":"debug","msg":"Subqueue handler batch round","ts":"2023-09-13T14:14:33Z"}
{"json":{"src":"composite_workqueue.go:98"},"level":"debug","msg":"Dynamically configured batch size [-1]","ts":"2023-09-13T14:14:33Z"}
launch_plans
where I can see the state=1 for scheduled launch plan only, while the other LPs are state 0. The schedulable_entities
table is empty.flyte-binary
deployment? From inside the container I see the following proc
root 7 0.6 8.1 2079380 160480 ? Sl 15:41 2:45 /usr/local/bin/flyte start --config /etc/flyte/config.d/*.yaml
Within the config files I can see the flyte.admin.disableScheduler: false
param..Ketan (kumare3)
Cody Scandore
09/13/2023, 11:33 PMKetan (kumare3)
Cody Scandore
09/13/2023, 11:34 PM--activate
, there is no change in status, scheduled_time, etc.Ketan (kumare3)
Cody Scandore
09/13/2023, 11:35 PMKetan (kumare3)
from datetime import datetime
from flytekit import task, workflow, LaunchPlan, CronSchedule
@task
def say_hello() -> str:
return "Hello"
@workflow
def talker() -> str:
return say_hello()
example_launch_plan = LaunchPlan.get_or_create(
name="talk-every-minute",
workflow=talker,
schedule=CronSchedule(
schedule="* * * * *", # Following schedule runs every min
),
)
I used the latest pyflyte run
pyflyte register backfill2.py --activate-launchplans
And it started running automaticallyCody Scandore
09/14/2023, 12:52 PMDavid Espejo (he/him)
09/14/2023, 3:20 PMCody Scandore
09/15/2023, 4:06 AMmain
commit from git, rather than the pip detected release. I've also only been using the pyflyte register .. --activate-launchplans
syntax. Previously I was using the pyflyte register..
, and then flytectl update launchplan ... --activate
style.Ketan (kumare3)