airflow.providers.standard.triggers.file

模組內容

類別

FileTrigger

一個觸發器,在找到請求的檔案或資料夾後精確地觸發一次。

class airflow.providers.standard.triggers.file.FileTrigger(filepath, recursive=False, poke_interval=5.0, **kwargs)[source]

基底: airflow.triggers.base.BaseTrigger

一個觸發器,在找到請求的檔案或資料夾後精確地觸發一次。

參數
  • filepath (str) – 檔案或資料夾名稱(相對於連線中設定的基礎路徑),可以是 glob。

  • recursive (bool) – 當設定為 True 時,啟用 glob 檔案路徑參數中 ** 的遞迴目錄匹配行為。預設為 False

  • poke_interval (float) – 作業在每次嘗試之間應等待的時間

serialize()[source]

序列化 FileTrigger 參數和類別路徑。

async run()[source]

迴圈直到找到相關檔案為止。

這個條目有幫助嗎?