https://prefect.io logo
#prefect-community
Title
# prefect-community
i

iKeepo w

10/26/2022, 9:20 AM
hello, why my flow always stuck at Pending State with the agent log like:
k

Khuyen Tran

10/26/2022, 3:49 PM
Can you give more details about your deployment setup? (what is your infrastructure, storage, and where your agent runs)
i

iKeepo w

10/27/2022, 1:29 AM
This is my deployment.yaml, it's just a rsycn flow, from shell run the
python script.py
is ok
Copy code
###
### A complete description of a Prefect Deployment for flow 'rsync-sherman-to-local-01'
###
name: from_sherman_to_winserver
description: "win_server"
version: '0'
# The work queue that will handle this deployment's runs
work_queue_name: rsync
tags:
- rsync_sherman_to_local_01
- win_server
- sherman
- oxen
- xms
parameters:
  host: win_server
schedule:
  cron: 30 23 * * 1-5/1
  timezone: Asia/Shanghai
  day_or: true
infra_overrides: {}

###
### DO NOT EDIT BELOW THIS LINE
###
flow_name: rsync-sherman-to-local-01
manifest_path: null
infrastructure:
  type: process
  env: {}
  labels: {}
  name: null
  command:
  - python
  - -m
  - prefect.engine
  stream_output: true
  _block_document_id: 098350b0-46da-4467-84a0-0711cb72eb43
  _block_document_name: anonymous-22c5b8df-f559-49fb-86eb-9d6e9b0688b2
  _is_anonymous: true
  _block_type_slug: process
storage: null
path: /mnt/c/Users/wind/on_develop
entrypoint: interact_xms/scripts/eod_upload_to_xms.py:rsync_sherman_to_local_01
parameter_openapi_schema:
  title: Parameters
  type: object
  properties:
    dt:
      title: dt
    host:
      title: host
      default: win_server
  required: null
  definitions: null
k

Khuyen Tran

10/27/2022, 4:41 PM
So you are running your agent in the local machine right?
i

iKeepo w

10/28/2022, 1:44 AM
yes, in the WSL2
k

Khuyen Tran

10/28/2022, 3:49 PM
@Ryan Peden Do you know what could cause this?
r

Ryan Peden

10/28/2022, 3:58 PM
Not from what I can see, unless there's something in the script that would freeze when it is started in a subprocess with a different working directory. That's the main difference between running it directly and running it with an agent.
i

iKeepo w

10/31/2022, 9:48 AM
Running it with an agent, the script would be copied into a /tmp directory, right?
r

Ryan Peden

10/31/2022, 1:40 PM
That's correct