Saber
01/19/2024, 4:24 PMJeff Hale
01/19/2024, 4:54 PM.deploy
to create the deployment.
See a repo here that uses a Prefect Managed work pool with the deployment. Then you don’t need a worker.Jeff Hale
01/19/2024, 4:54 PMfrom datetime import datetime
from prefect import flow
@flow(retries=3, retry_delay_seconds=5, log_prints=True)
def dummy_flow(date: datetime = datetime.now()):
print(f"It was {date.strftime('%A')} on {date.isoformat()}")
if __name__ == "__main__":
flow.from_source(
source="<https://github.com/discdiver/help-repo.git>",
entrypoint="load_from_storage.py:dummy_flow",
).deploy(name="example1", work_pool_name="managed2")
Jeff Hale
01/19/2024, 4:55 PMpython load_from_storage.py
to create the deployment.Saber
01/22/2024, 12:54 PMSaber
01/23/2024, 1:33 PM<https://github.com/><username>/<repository>.git
, git was forced to clone using ssh keys via git@github.com:<username>/<repository>.git
url.
There is a nice discussion in this link.
So basically it was not related to the prefect in the example code though prefect prefect-gitlab python modul must be used with caution.