Code-Society-Lab / Code-Society-Lab/matrixpy

Scheduler: Add `unschedule` method

Aperta
#71 1 commento 0 reazioni 1 assegnatario Rivendicata da @Shouryaverma19 Vedi su GitHub
good first issue
Lingua principale
Python
Stelle
14
Fork
7
Merge medio
8g 19h
PR unite (30g)
5

Descrizione

Jobs registered with `schedule()` can't be removed at runtime. This is needed for bots that conditionally disable scheduled tasks.

### Proposed API
```python
def unschedule(self, name: str) -> None
```

### Example
```python
bot.scheduler.unschedule("morning_update")
```

### Before opening a PR
- Write unit tests
- Run `mypy matrix/`
- Run `pytest tests/`
- Run `black .`

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.