cleanup code
This commit is contained in:
parent
26452d0f53
commit
c06c7958e2
10 changed files with 64 additions and 14 deletions
|
@ -1,6 +1,7 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"slices"
|
||||
|
@ -21,6 +22,11 @@ func HandleDownloadRequest(
|
|||
ctx *ext.Context,
|
||||
dlCtx *models.DownloadContext,
|
||||
) error {
|
||||
taskCtx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
|
||||
defer cancel()
|
||||
|
||||
dlCtx.Context = taskCtx
|
||||
|
||||
chatID := ctx.EffectiveMessage.Chat.Id
|
||||
if dlCtx.Extractor.Type == enums.ExtractorTypeSingle {
|
||||
TypingEffect(bot, ctx, chatID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue