0f91cf1fd44de2276fb2bde632632ab0d069b081
Complete the FTP async migration by implementing the missing ftp_send_raw_csv_to_customer() function for sending raw CSV data. ## Changes ### Implementation - Implemented ftp_send_raw_csv_to_customer(): * Retrieves raw CSV from database (received.tool_data column) * Queries FTP configuration from units table * Supports ftp_filename_raw and ftp_target_raw columns * Fallback to standard ftp_filename/ftp_target if raw not configured * Full async implementation with AsyncFTPConnection - Updated _send_raw_data_ftp(): * Removed placeholder (if True) * Now calls actual ftp_send_raw_csv_to_customer() * Enhanced error handling and logging ### Features - Dual query approach: 1. Get raw CSV data from received table by id 2. Get FTP config from units table by unit name - Smart fallback for filename/target directory - Proper error handling for missing data/config - Detailed logging for debugging - Supports both string and bytes data types ### Database Schema Support Expected columns in units table: - ftp_filename_raw (optional, fallback to ftp_filename) - ftp_target_raw (optional, fallback to ftp_target) - ftp_addrs, ftp_user, ftp_passwd, ftp_parm (required) Expected columns in received table: - tool_data (TEXT/BLOB containing raw CSV data) ## Impact - Completes raw data FTP workflow - Enables automatic sending of unprocessed CSV files to customers - Maintains consistency with elaborated data sending flow - Full async implementation (no blocking I/O) ## Testing Manual testing required with: - Database with raw CSV data in received.tool_data - Unit configuration with FTP settings - Accessible FTP/FTPS server 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Description
No description provided
Languages
Python
100%