Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Selective persistent termination logs #9

Merged
merged 2 commits into from
Oct 19, 2022

Conversation

achimnol
Copy link
Owner

@achimnol achimnol commented Oct 19, 2022

Now it will preserve the termination log of any asyncio task wrapped with the preserve_termination_log decorator indefinitely, regardless of the history limit.

from aiomonitor.task import preserve_termination_log

@preserve_termination_log
async def long_running_task():
    ...

- We should preserve the termination log of tasks that are supposed to
  be long-running and not terminated during the entire application
  lifecycle (e.g., server apps), when there are many volatile tasks
  continuously spawned and destroyed, regardless of the history limit.
@achimnol achimnol added the enhancement New feature or request label Oct 19, 2022
@achimnol achimnol merged commit 18acda2 into master Oct 19, 2022
@achimnol achimnol deleted the feature/selective-persistent-termination-logs branch October 19, 2022 08:27
achimnol added a commit to aio-libs/aiomonitor that referenced this pull request Apr 24, 2023
* Add optional task creation stack chains to 'where' command (achimnol#1)
* feat: Rewrite ps command to provide more concise view (achimnol#2)
* feature: print numbers of total tasks when executing `ps` (achimnol#3)
* Adopt `prompt_toolkit` and support concurrent clients (achimnol#4)
* feat: Migrate to Click-based command line interface (achimnol#5)
* fix: Reimplement console command (achimnol#6)
* Support auto-completion of commands and arguments (achimnol#7)
* Implement cancellation chain tracker (achimnol#8)
* New commands:
  - `ps-terminated` (`pt`, `pst`)
  - `where-termianted` (`wt`)
* New options:
  - `ps`, `pt`: `-f`, `--filter` to search task logs by their names and
    coroutine summary strings
  - `aiomonitor.Monitor` now has the history limit option (default: 1000)
* Selective persistent termination logs (achimnol#9)
- We should preserve the termination log of tasks that are supposed to
  be long-running and not terminated during the entire application
  lifecycle (e.g., server apps), when there are many volatile tasks
  continuously spawned and destroyed, regardless of the history limit.
* fix: Support passing `name` and `context` kwarg to `create_task()` (achimnol#10)
* fix: Regression in Python 3.10 due to achimnol#10 (achimnol#11)

---------

Co-authored-by: Kyujin Cho <thy2134@me.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant