Merged
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (99.75%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #5815 +/- ##
===========================================
+ Coverage 91.79% 92.27% +0.47%
===========================================
Files 496 494 -2
Lines 34343 34480 +137
Branches 3569 3597 +28
===========================================
+ Hits 31525 31816 +291
+ Misses 2047 1914 -133
+ Partials 771 750 -21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… into 207255_Celery_tasks_refactor
… into 207255_Celery_tasks_refactor
pavlo-mk
approved these changes
Mar 24, 2026
added 2 commits
April 10, 2026 09:55
saxix
approved these changes
Apr 10, 2026
johniak
requested changes
Apr 13, 2026
johniak
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AB#207255
Added django_celery_boost to:
hope/apps/account/celery_tasks.py:
invalidate_permissions_cache_for_user_if_expired_role
hope/apps/accountability/celery_tasks.py:
export_survey_sample_task, send_survey_to_users
hope/apps/core/celery_tasks.py:
upload_new_kobo_template_and_update_flex_fields_task_with_retry, upload_new_kobo_template_and_update_flex_fields_task, async_job_task, async_retry_job_task
hope/apps/dashboard/celery_tasks.py:
update_dashboard_figures, update_recent_dashboard_figures, generate_dash_report_task
hope/apps/generic_import/celery_tasks.py:
process_generic_import_task
hope/apps/geo/celery_tasks.py:
import_areas_from_csv_task
hope/apps/grievance/celery_tasks.py:
deduplicate_and_check_against_sanctions_list_task_single_individual, periodic_grievances_notifications
hope/apps/household/celery_tasks.py:
recalculate_population_fields_chunk_task, recalculate_population_fields_task, interval_recalculate_population_fields_task, calculate_children_fields_for_not_collected_individual_data, revalidate_phone_number_task, enroll_households_to_program_task, mass_withdraw_households_from_list_task, cleanup_indexes_in_inactive_programs_task
hope/apps/payment/celery_tasks.py:
get_sync_run_rapid_pro_task, create_payment_verification_plan_xlsx, remove_old_cash_plan_payment_verification_xlsx, create_payment_plan_payment_list_xlsx,
create_payment_plan_payment_list_xlsx_per_fsp, send_payment_plan_payment_list_xlsx_per_fsp_password, import_payment_plan_payment_list_from_xlsx, payment_plan_set_entitlement_flat_amount,
payment_plan_apply_custom_exchange_rate, import_payment_plan_payment_list_per_fsp_from_xlsx, payment_plan_apply_engine_rule, update_exchange_rate_on_release_payments, remove_old_payment_plan_payment_list_xlsx,
prepare_payment_plan_task, prepare_follow_up_payment_plan_task, payment_plan_exclude_beneficiaries, export_pdf_payment_plan_summary, periodic_sync_payment_gateway_fsp,
periodic_sync_payment_gateway_account_types, send_to_payment_gateway, periodic_sync_payment_gateway_records, send_payment_notification_emails, periodic_sync_payment_gateway_delivery_mechanisms,
payment_plan_apply_steficon_hh_selection, payment_plan_rebuild_stats, payment_plan_full_rebuild, periodic_sync_payment_plan_invoices_western_union_ftp, send_qcf_report_email_notifications,
periodic_send_payment_plan_reconciliation_overdue_emails, send_payment_plan_reconciliation_overdue_email
hope/apps/periodic_data_update/celery_tasks.py:
import_periodic_data_update, export_periodic_data_update_export_template_service, generate_pdu_online_edit_data_task, merge_pdu_online_edit_task,
remove_old_pdu_template_files_task, send_pdu_online_edit_notification_emails
hope/apps/program/celery_tasks.py:
copy_program_task, adjust_program_size_task, populate_pdu_new_rounds_with_null_values_task
hope/apps/registration_data/celery_tasks.py:
registration_xlsx_import_task, registration_program_population_import_task, registration_kobo_import_task, registration_kobo_import_hourly_task,
registration_xlsx_import_hourly_task, merge_registration_data_import_task, rdi_deduplication_task, pull_kobo_submissions_task, validate_xlsx_import_task, deduplicate_documents, check_rdi_import_periodic_task,
deduplication_engine_process, fetch_biometric_deduplication_results_and_process
hope/apps/sanction_list/celery_tasks.py:
sync_sanction_list_task, check_against_sanction_list_task
hope/apps/targeting/celery_tasks.py:
create_tp_from_list
hope/apps/universal_update_script/celery_tasks.py:
run_universal_individual_update, generate_universal_individual_update_template
hope/apps/utils/celery_tasks.py:
send_email_task
hope/contrib/aurora/celery_tasks.py:
process_flex_records_task, extract_records_task, fresh_extract_records_task, automate_rdi_creation_task, clean_old_record_files_task
Refactored:
• hope/apps/accountability/celery_tasks.py
Fix: removed the extra query and used survey.business_area.slug directly.
hope/apps/dashboard/celery_tasks.py
Fix: iterates the queryset directly.
hope/apps/grievance/celery_tasks.py
Fix: added select_related("business_area").
Fix: saves only last_notification_sent with update_fields=["last_notification_sent"].
hope/apps/household/celery_tasks.py
Fix: added select_related("business_area") and limited fields to the values actually used.
hope/apps/payment/celery_tasks.py
accumulated all eligible payments in memory before bulk_update.
Fix: switched to chunked iteration and chunked bulk_update.
Fix: replaced validation with set-based queries and set comparisons.
Fix: added select_related("household"), iterated in chunks, and bulk-updated in chunks.
used queryset truthiness and logged .count() after deleting rows.
Fix: captures removed_count before deletion, returns early when empty, and streams deletions with iterator
hope/apps/periodic_data_update/celery_tasks.py
Fix: captures removed_count up front, returns early when empty, streams file deletions with .iterator(chunk_size=1000).
hope/apps/registration_data/celery_tasks.py
re-fetched related models after already loading the pending RDI.
Fix: uses select_related("business_area", "program", "import_data") and reuses the fetched relations.
Fix: removed the duplicate lookup.
Fix: iterates with .iterator(chunk_size=1000) and saves only unique_field via update_fields=["unique_field"].