YD
07/29/2021, 6:48 PMhello_world.py
the Prefect.io server runs on a VM on AWS, with python 3.6
with latest prefect python package
agent is running:
agent
LocalAgent
LAST QUERY
11:19am | 1 seconds ago
CORE VERSION
0.15.3
when running hello_world.py
using python3.6, the schedule does not work
when running using python3.8, the schedule works, but I get errors
Why does the schedule does not work with the python3.6 ?
(It used to work.. not sure what changed)
I tried pip install prefect --upgrade (both on laptop and VM)
killed the old agent (on lap top)
prefect backend server (on laptop)
prefect agent local start --label "<label>" (on laptop)
this did not helpKevin Kho
Kevin Kho
Kevin Kho
YD
07/29/2021, 6:55 PMKevin Kho
YD
07/29/2021, 6:59 PMKevin Kho
YD
07/29/2021, 7:00 PMYD
07/29/2021, 7:02 PMKevin Kho
YD
07/29/2021, 7:04 PMKevin Kho
YD
07/29/2021, 7:06 PMfrom prefect import task, Flow
from prefect.schedules import IntervalSchedule
from datetime import timedelta, datetime
@task(log_stdout=True)
def say_hello():
print("Hello world!")
def main():
schedule = IntervalSchedule(
start_date=datetime.utcnow() + timedelta(seconds=1),
interval=timedelta(minutes=1),
)
with Flow("hello_world", schedule=schedule) as flow:
say_hello()
flow.register(project_name="test")
print('done')
if __name__ == "__main__":
main()
Kevin Kho
YD
07/29/2021, 7:20 PMYD
07/29/2021, 7:21 PMKevin Kho
YD
07/29/2021, 9:09 PMKevin Kho
query Api {
api {
backend
mode
version
core_version
release_timestamp
}
}
YD
07/29/2021, 9:14 PMKevin Kho
YD
07/29/2021, 9:18 PMKevin Kho
YD
07/29/2021, 9:40 PMKevin Kho
--use-volume
to persist the data.YD
07/29/2021, 9:48 PMYD
07/29/2021, 9:53 PMYD
07/30/2021, 5:11 PMKevin Kho
YD
07/30/2021, 6:10 PMKevin Kho
YD
07/30/2021, 6:13 PMKevin Kho
YD
07/30/2021, 8:21 PMKevin Kho