fix: re-add sync target to Makefile all and fix asyncio loop reference in get_recent_rants
The Makefile's `all` target was missing the `sync` step, which has now been restored alongside a fix in `src/drstats/sync.py` where `asyncio.wait_for` incorrectly called `asyncio.run_in_executor` instead of the proper `loop.run_in_executor` to avoid event loop context errors during async execution.
This commit is contained in:
parent
a6fd640e92
commit
2f3a4431b6
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
all: build sync_excempt export_dataset export_stats merge_images export_statistics export_mentions
|
||||
all: build sync export_dataset export_stats merge_images export_statistics export_mentions
|
||||
|
||||
build:
|
||||
pip install build
|
||||
|
||||
BIN
drstats.db
BIN
drstats.db
Binary file not shown.
@ -32,7 +32,7 @@ async def get_recent_rants(start_from=1, page_size=10):
|
||||
def get_rants():
|
||||
return dr.get_rants("recent", page_size, start_from)["rants"]
|
||||
|
||||
rants = asyncio.wait_for(asyncio.run_in_executor(get_rants), 5)
|
||||
rants = asyncio.wait_for(loop.run_in_executor(get_rants), 5)
|
||||
|
||||
page += 1
|
||||
for rant in rants:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user