aboutsummaryrefslogtreecommitdiffstats
path: root/slack/task.py
Commit message (Collapse)AuthorAgeFilesLines
* Use hook_url for http requests when availableTrygve Aaberge2024-02-181-0/+5
|
* Improve typing in task.pyTrygve Aaberge2024-02-181-6/+7
|
* Record uncaught errors and add command to display themTrygve Aaberge2024-02-181-3/+3
|
* Warn when failed tasks are not awaitedTrygve Aaberge2024-02-181-2/+23
| | | | | | | | | | | | | | If the task runner has finished all running/active tasks, there shouldn't be any tasks that hasn't been awaited. If there were (e.g. create_task was used when run_async should have been used), exceptions from those tasks would be silently ignored, so warn about this. The difference between running and active tasks is that active tasks are tasks waiting for a future to resolve, while running tasks include the currently running task. E.g. if task A creates a new task, B, and task B fails before task A has finished, task A won't be in active tasks, so therefore we need a different set to keep track of the running tasks.
* Don't send response into coroutineTrygve Aaberge2024-02-181-16/+13
| | | | It's now set with set_result/set_exception instead.
* Simplify gather and return immediately on exceptionTrygve Aaberge2024-02-181-24/+10
|
* Sleep for 1 ms if 0 ms is specifiedTrygve Aaberge2024-02-181-3/+2
| | | | | | | | asyncio.sleep(0) is used to move the task to the back of the event loop. This sleep can be used for the same, however if 0 is specified, WeeChat never calls the callback. This means that the task will silently not continue which is very bad, so make it sleep for 1 ms instead, which is practically the same.
* Simplify setting future_idTrygve Aaberge2024-02-181-4/+1
|
* Log failed async tasks more robustlyTrygve Aaberge2024-02-181-26/+13
|
* Don't set future result in __await__Trygve Aaberge2024-02-181-10/+7
|
* Make Future very similar to asyncio.FutureTrygve Aaberge2024-02-181-21/+97
|
* Cancel connecting when disconnect is calledTrygve Aaberge2024-02-181-0/+15
|
* Replace some usages of Any with proper typesTrygve Aaberge2024-02-181-3/+3
|
* Handle user group fetch errorTrygve Aaberge2024-02-181-2/+6
|
* Improve error printingTrygve Aaberge2024-02-181-11/+10
|
* Fix compatibility with Python 3.7Trygve Aaberge2024-02-181-1/+4
|
* Fix task exception handlingTrygve Aaberge2024-02-181-2/+9
|
* Only print/raise errors for finished tasksTrygve Aaberge2024-02-181-12/+21
|
* Use BaseException instead of Exception in task.pyTrygve Aaberge2024-02-181-2/+2
|
* Support return_exceptions in gatherTrygve Aaberge2024-02-181-6/+51
|
* Make sure tasks raising exceptions are finishedTrygve Aaberge2024-02-181-21/+27
| | | | | | When a task raises an execution we have to make sure to continue the tasks that are waiting on it, and to re-raise this exception in the __await__ so it propagates up.
* Print error message on http/api errorTrygve Aaberge2024-02-181-1/+17
|
* Fix async functions returning None and without await never finishingTrygve Aaberge2024-02-181-6/+20
|
* Remove active_responsesTrygve Aaberge2024-02-181-17/+6
|
* Don't fetch the same user multiple timesTrygve Aaberge2024-02-181-22/+45
|
* Unfurl user ids in messagesTrygve Aaberge2024-02-181-0/+1
|
* Add SlackMessage classTrygve Aaberge2024-02-181-9/+2
|
* Use fetched usersTrygve Aaberge2024-02-181-1/+8
|
* Create buffers on connectTrygve Aaberge2024-02-181-1/+6
|
* Don't use relative importsTrygve Aaberge2024-02-181-2/+2
|
* Use class for shared, so we don't have to change usage when combiningTrygve Aaberge2024-02-181-12/+12
|
* Move main file out of directoryTrygve Aaberge2024-02-181-2/+3
|
* Add callbacks to global scopeTrygve Aaberge2024-02-181-1/+4
|
* Rename globals to GTrygve Aaberge2024-02-181-12/+12
|
* Split into multiple filesTrygve Aaberge2024-02-181-0/+79