aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-06-24Scheduler: remove duplicate dict deleteGravatar MarkKoz-1/+0
The task is already popped from the dict, so there is no need to delete it afterwards.
2020-06-23Scheduler: close coroutine if task ID already existsGravatar MarkKoz-1/+7
This prevents unawaited coroutine warnings.
2020-06-20Update InfractionScheduler's scheduler to the new APIGravatar MarkKoz-17/+12
2020-06-20Update HelpChannels's scheduler to the new APIGravatar MarkKoz-50/+20
2020-06-20Update Silence's scheduler to the new APIGravatar MarkKoz-26/+6
2020-06-20Update Reminders's scheduler to the new APIGravatar MarkKoz-14/+15
2020-06-20Update Filtering's scheduler to the new APIGravatar MarkKoz-10/+6
2020-06-20Scheduler: add a method to schedule at a specific datetimeGravatar MarkKoz-0/+13
2020-06-20Scheduler: add a method to schedule with a delayGravatar MarkKoz-0/+19
2020-06-20Scheduler: rename "task" param to "coroutine"Gravatar MarkKoz-3/+3
Naming it "task" is inaccurate because `create_task` accepts a coroutine rather than a Task. What it does is wrap the coroutine in a Task.
2020-06-20Scheduler: drop _task suffix from method namesGravatar MarkKoz-3/+3
It's redundant. After all, this scheduler cannot schedule anything else.
2020-06-20Scheduler: remove ignore_missing paramGravatar MarkKoz-10/+5
The ability to use the `in` operator makes this obsolete. Callers can check themselves if a task exists before they try to cancel it.
2020-06-19Scheduler: use pop instead of get when cancellingGravatar MarkKoz-7/+7
2020-06-19Scheduler: add support for in operatorGravatar MarkKoz-0/+4
2020-06-19Scheduler: name tasksGravatar MarkKoz-1/+1
Makes them easier to identify when debugging.
2020-06-19Scheduler: directly take the awaitable to scheduleGravatar MarkKoz-23/+4
This is a major change which simplifies the interface. It removes the need to implement an abstract method, which means the class can now be instantiated rather than subclassed.
2020-06-19Scheduler: use separate logger for each instanceGravatar MarkKoz-24/+17
Each instance now requires a name to be specified, which will be used as the suffix of the logger's name. This removes the need to manually prepend every log message with the name.