dssg / dssg/givinggraph

Make tasks asynchronous

Open
#19 1 comment 0 reactions 0 assignees View on GitHub
enhancement future work
Dominant language
Python
Stars
29
Forks
13
PR merge metrics
No merged PRs in 30d

Description

The tasks called inside tasks.py's add_new_nonprofit(...) and perform_aggregate_tasks(...) should be asynchronous. There's some commented-out code for this using Celery, but there's a race condition involving SQL Alchemy. E.g., task A will commit a new nonprofit row to the DB, but queries performed afterwards by task B won't see that new nonprofit row.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in tasks.py with add_new_nonprofit(...) and perform_aggregate_tasks(...), then inspect the commented-out Celery code and the SQLAlchemy transaction flow. Reproduce the ordering where task B cannot see task A's committed nonprofit row. Done means the task execution is asynchronous without the reported race, with database changes visible to dependent work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlalchemy
Domain
backend, databases, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.