Commit 1d3a505
authored
🔧 refactor: Document Processing and Health Check Functions (#221)
* 🔧 refactor: Document Processing and Health Check Functions
* Refactored `_prepare_documents_sync` to handle document preparation synchronously, improving performance and clarity.
* Updated `store_data_in_vector_db` to utilize the new synchronous document preparation function, ensuring non-blocking behavior in the async context.
* Changed `is_health_ok` to be asynchronous, allowing for proper handling of health checks for different database types.
These changes streamline document processing and improve the responsiveness of health checks in the application.
* 🔧 refactor: Update Event Loop Retrieval in Document Processing
* Replaced `asyncio.get_event_loop()` with `asyncio.get_running_loop()` in `_process_documents_batched_sync` and `store_data_in_vector_db` to ensure compatibility with the current asyncio context.
* This change enhances the reliability of asynchronous operations by using the correct method for obtaining the running event loop.1 parent 95db2e1 commit 1d3a505
2 files changed
+37
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
| 551 | + | |
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
| 611 | + | |
612 | 612 | | |
613 | 613 | | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
618 | 621 | | |
619 | 622 | | |
620 | 623 | | |
| |||
626 | 629 | | |
627 | 630 | | |
628 | 631 | | |
629 | | - | |
| 632 | + | |
630 | 633 | | |
631 | 634 | | |
632 | 635 | | |
| |||
639 | 642 | | |
640 | 643 | | |
641 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
642 | 664 | | |
643 | 665 | | |
644 | 666 | | |
645 | 667 | | |
646 | 668 | | |
647 | | - | |
| 669 | + | |
648 | 670 | | |
649 | 671 | | |
650 | | - | |
| 672 | + | |
651 | 673 | | |
652 | 674 | | |
653 | 675 | | |
| |||
884 | 906 | | |
885 | 907 | | |
886 | 908 | | |
887 | | - | |
| 909 | + | |
888 | 910 | | |
889 | 911 | | |
890 | 912 | | |
| |||
926 | 948 | | |
927 | 949 | | |
928 | 950 | | |
929 | | - | |
| 951 | + | |
930 | 952 | | |
931 | 953 | | |
932 | 954 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
0 commit comments