js10
08/09/2022, 2:11 AMFlow could not be retrieved from deployment.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/prefect/engine.py", line 247, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "/usr/local/lib/python3.9/dist-packages/prefect/client.py", line 104, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/prefect/deployments.py", line 47, in load_flow_from_flow_run
await storage_block.get_directory(from_path=None, local_path=".")
File "/usr/local/lib/python3.9/dist-packages/prefect/filesystems.py", line 98, in get_directory
shutil.copytree(from_path, local_path, dirs_exist_ok=True)
File "/usr/lib/python3.9/shutil.py", line 568, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
File "/usr/lib/python3.9/shutil.py", line 522, in _copytree
raise Error(errors)
shutil.Error: [('/home/app/app/.prefect/orion.db-shm', './.prefect/orion.db-shm', "[Errno 2] No such file or directory: '/home/app/app/.prefect/orion.db-shm'")]
Mason Menges
08/09/2022, 7:09 PMBianca Hoch
08/09/2022, 7:10 PMjs10
08/10/2022, 2:54 AMimport sys
sys.path.append("/home/app/app")
import pytz
import uuid
from datetime import datetime
from prefect import flow, task, get_run_logger
@task(name='trend:store')
def store_data(data, kw, timeframe, geo):
logger = get_run_logger()
<http://logger.info|logger.info>(f"saved some stuff to db from the internet")
@flow(name="store7day")
def store_7_day():
store_data(data, coninuous_7_day, timeframe='123', geo='US')
@flow(name="store4h")
def store_4_hour():
store_data(data, coninuous_7_day, timeframe='123', geo='US')
if __name__ == "__main__":
store_meta()
prefect = "^2.0.2"
Anna Geller
08/12/2022, 4:26 PM