Skip to content

fix(ftp): reconnect stale pooled sessions before downloading - #364

Merged
luabida merged 2 commits into
AlertaDengue:mainfrom
luabida:fix/ftp-stale-session
Oct 1, 2026
Merged

luabida merged 2 commits into
AlertaDengue:mainfrom
luabida:fix/ftp-stale-session

Conversation

@luabida

@luabida luabida commented Oct 1, 2026

Copy link
Copy Markdown
Member

DATASUS drops idle FTP control connections. When the sync pipeline reused a pooled session, RETR hung until the socket timed out and the worker thread's exception was never retrieved, stalling the whole run. Ping the session with NOOP and reconnect when stale before every transfer, and use a non-blocking close (quit can hang on a dead link).

DATASUS drops idle FTP control connections. When the sync pipeline reused
a pooled session, RETR hung until the socket timed out and the worker
thread's exception was never retrieved, stalling the whole run. Ping the
session with NOOP and reconnect when stale before every transfer, and use
a non-blocking close (quit can hang on a dead link).
@luabida
luabida force-pushed the fix/ftp-stale-session branch from 5214682 to d072a93 Compare October 1, 2026 17:36
@codecov-commenter

codecov-commenter commented Oct 1, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 96.06299% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@231acf6). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pysus/management/sync.py 89.47% 4 Missing ⚠️
pysus/tests/management/test_sync.py 98.86% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #364   +/-   ##
=======================================
  Coverage        ?   97.20%           
=======================================
  Files           ?      180           
  Lines           ?    22908           
  Branches        ?        0           
=======================================
  Hits            ?    22267           
  Misses          ?      641           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@luabida
luabida marked this pull request as ready for review October 1, 2026 18:52
@luabida
luabida merged commit ba2ddf9 into AlertaDengue:main Oct 1, 2026
15 checks passed
@luabida
luabida deleted the fix/ftp-stale-session branch October 1, 2026 18:58
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.11.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants