Commit 1456ae3
committed
fix(auth): š improve credential refresh detection and prevent queue processor stuck state
Enhanced the proactive token refresh logic in both IFlowAuthBase and QwenAuthBase to more robustly detect OAuth credentials versus direct API keys:
- Changed from checking file existence/env:// prefix to attempting credential load in try/except block
- Added comprehensive debug logging throughout the refresh flow to track credential lifecycle
- Fixed BUG#6 where queued credentials were not cleared on queue processor timeout, potentially causing stuck state
- Now clears both unavailable_credentials and queued_credentials when processor times out
The previous approach of checking `is_env_path` and `os.path.isfile()` could incorrectly classify credentials. The new approach leverages the existing `_load_credentials()` exception handling to make a definitive determination.1 parent 219a7a9 commit 1456ae3
File tree
2 files changed
+52
-14
lines changed- src/rotator_library/providers
2 files changed
+52
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
752 | | - | |
753 | | - | |
| 752 | + | |
754 | 753 | | |
755 | | - | |
756 | | - | |
757 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
758 | 764 | | |
759 | | - | |
760 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
761 | 774 | | |
762 | 775 | | |
763 | 776 | | |
| |||
861 | 874 | | |
862 | 875 | | |
863 | 876 | | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
864 | 883 | | |
865 | 884 | | |
866 | 885 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
479 | | - | |
480 | | - | |
| 479 | + | |
481 | 480 | | |
482 | | - | |
483 | | - | |
484 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
485 | 491 | | |
486 | | - | |
487 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
488 | 501 | | |
489 | 502 | | |
490 | 503 | | |
| |||
587 | 600 | | |
588 | 601 | | |
589 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
590 | 609 | | |
591 | 610 | | |
592 | 611 | | |
| |||
0 commit comments