Kayode_Coolbet
02/21/2025, 12:13 PMMarvin
02/21/2025, 12:13 PMKayode_Coolbet
02/21/2025, 12:14 PMINSERT INTO task_run (flow_run_id, task_key, dynamic_key, flow_run_run_count, empirical_policy, task_inputs, tags, name, run_count, expected_start_time, total_run_time, id, created, updated) VALUES ($1::UUID, $2::VARCHAR, $3::VARCHAR, $4::INTEGER, $5, $6, $7::JSONB, $8::VARCHAR, $9::INTEGER, $10::TIMESTAMP WITH TIME ZONE, $11::INTERVAL, $12::UUID, $13::TIMESTAMP WITH TIME ZONE, $14::TIMESTAMP WITH TIME ZONE) ON CONFLICT (id) DO UPDATE SET flow_run_id = $15::UUID, task_key = $16::VARCHAR, dynamic_key = $17::VARCHAR, flow_run_run_count = $18::INTEGER, empirical_policy = $19, task_inputs = $20, tags = $21::JSONB, name = $22::VARCHAR, run_count = $23::INTEGER, expected_start_time = $24::TIMESTAMP WITH TIME ZONE, total_run_time = $25::INTERVAL, id = $26::UUID, updated = $27::TIMESTAMP WITH TIME ZONE WHERE task_run.state_timestamp < $28::TIMESTAMP WITH TIME ZONE
Marvin
02/21/2025, 12:14 PMKayode_Coolbet
02/21/2025, 12:16 PMMarvin
02/21/2025, 12:16 PMtask_run
table, is likely part of Prefect's database interactions. The specific source code handling task runs can be found in the Prefect repository. Here are some relevant files you might want to explore:
1. Task Worker Implementation: The task_worker.py
file contains logic related to task runs. You can view it here.
2. Tasks Management: Another relevant file is tasks.py
, which might contain logic related to task execution and management. Check it out here.
These files are part of the Prefect codebase and should provide insight into how task runs are managed and potentially how the SQL for task runs is executed. If you're looking for the exact SQL execution, you might need to dig into the database interaction layer, which often involves SQLAlchemy in Prefect.