Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a60d249
Await loop function instead of calling ensure_future on it
DanielEidlin Feb 24, 2022
9776d27
Merge branch 'master' of https://github.com/yuval9313/FastApi-RESTful…
DanielEidlin Feb 25, 2022
eaf9119
Ensure max_repetition is enforced even when an exception occurs
DanielEidlin Mar 4, 2022
6994571
Install pytest-mock
DanielEidlin Mar 4, 2022
747091c
Improve test
DanielEidlin Mar 4, 2022
08530d9
Reformat file
DanielEidlin Mar 4, 2022
02425ab
Pin version for flake8
yuval9313 Mar 4, 2022
e6be7ac
Fix missing type annotations
yuval9313 Mar 4, 2022
4f26ae5
Add fixtures
DanielEidlin Mar 10, 2022
84c3936
Resolve conflicts
DanielEidlin Mar 10, 2022
ebe49cf
Organize test cases in classes
DanielEidlin Mar 10, 2022
3983adc
Use unittest mock instead of pytest-mock
DanielEidlin Mar 10, 2022
1b1e304
Run isort
DanielEidlin Mar 11, 2022
dab91be
Remove unused imports
DanielEidlin Mar 11, 2022
9d81e5c
Run black
DanielEidlin Mar 11, 2022
ac07d44
Define test base class
DanielEidlin May 3, 2022
d0516d2
Merge branch 'master' of https://github.com/yuval9313/FastApi-RESTful…
DanielEidlin Jun 17, 2022
e68948a
Merge remote-tracking branch 'origin/master' into bugfix/repeat-every…
yuval9313 Sep 2, 2022
051b9ba
Format code with black and isort
deepsource-autofix[bot] Sep 2, 2022
9edb6a3
Merge branch 'master' into bugfix/repeat-every-runs-only-once
yuval9313 Jun 5, 2023
48ca640
style: Format code with black and isort
deepsource-autofix[bot] Jun 5, 2023
f14c29e
Update poetry lock
yuval9313 Jun 5, 2023
26532af
Merge branch 'master' into bugfix/repeat-every-runs-only-once
yuval9313 Jun 5, 2023
48b3b1d
Fix formatting and imports
yuval9313 Jun 6, 2023
6102eb4
Fix typehints issue
yuval9313 Jun 6, 2023
711aaf8
Ignore mypy bug
yuval9313 Jun 6, 2023
e85ebfd
Merge branch 'master' into bugfix/repeat-every-runs-only-once
yuval9313 Jun 6, 2023
945daf7
Merge branch 'master' into bugfix/repeat-every-runs-only-once
yuval9313 Jun 6, 2023
7226bbd
Fix test testing the wrong parameters
yuval9313 Jun 6, 2023
bfabb1d
gerge branch 'master' into bugfix/repeat-every-runs-only-once
yuval9313 Jun 8, 2023
c6dc89d
Merge remote-tracking branch 'origin/master' into bugfix/repeat-every…
yuval9313 Nov 2, 2023
c4b18f8
Add changelog
yuval9313 Dec 14, 2023
555b872
Add mock as backport for unittest
yuval9313 Dec 14, 2023
52c7b63
Add conditional import for python3.7
yuval9313 Dec 16, 2023
316ebe1
Change asyncmock to mock
yuval9313 Dec 17, 2023
dd8f4ac
Restore test to use AsyncMock
yuval9313 Dec 17, 2023
bd50c49
Move all mock objects to be under Mock for python<3.8
yuval9313 Dec 18, 2023
4035068
style: format code with Black and isort
deepsource-autofix[bot] Dec 18, 2023
e5df9b7
Format files
yuval9313 Dec 18, 2023
3a767d9
Remove breakpoints
yuval9313 Dec 18, 2023
c39e617
Fix conflicts with mypy
yuval9313 Dec 18, 2023
c36e03d
Add mock stubs
yuval9313 Dec 20, 2023
2319065
Add the import for mypy
yuval9313 Dec 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
## Latest changes

* Fix `repeat_every` is only running once [#142](https://github.com/yuval9313/FastApi-RESTful/pull/142)

## 0.5.0

* Bump sqlalchemy from 1.4.48 to 2.0.19 by @dependabot in #202
* Pydantic v2 by @ollz272 in #199
* fix ci not run by @ollz272 in #208
* Pydantic v2 by @ollz272 in [#199](https://github.com/yuval9313/FastApi-RESTful/pull/199)
* fix ci not run by @ollz272 in [#208](https://github.com/yuval9313/FastApi-RESTful/pull/208)

## 0.4.5

Expand Down
5 changes: 2 additions & 3 deletions fastapi_restful/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import asyncio
import logging
from asyncio import ensure_future
from functools import wraps
from traceback import format_exception
from typing import Any, Callable, Coroutine, Union
Expand Down Expand Up @@ -66,16 +65,16 @@ async def loop() -> None:
await func() # type: ignore
else:
await run_in_threadpool(func)
repetitions += 1
except Exception as exc:
if logger is not None:
formatted_exception = "".join(format_exception(type(exc), exc, exc.__traceback__))
logger.error(formatted_exception)
if raise_exceptions:
raise exc
repetitions += 1
await asyncio.sleep(seconds)

ensure_future(loop())
await loop()

return wrapped

Expand Down
Loading