Fix docker i guess?!?
This commit is contained in:
		
							parent
							
								
									eb79887063
								
							
						
					
					
						commit
						8ace6ca157
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
open System
 | 
			
		||||
open System.Net.Http
 | 
			
		||||
open System.Threading
 | 
			
		||||
open System.Threading.Tasks
 | 
			
		||||
open PublishHelperBot.Environment
 | 
			
		||||
open PublishHelperBot.YoutubeDl
 | 
			
		||||
| 
						 | 
				
			
			@ -9,8 +10,8 @@ open Telegram.Bot.Polling
 | 
			
		|||
open Telegram.Bot.Types
 | 
			
		||||
open Telegram.Bot.Types.Enums
 | 
			
		||||
 | 
			
		||||
let cancellation = new CancellationTokenSource()
 | 
			
		||||
let config = createConfig "SBPB_CONFIG_PATH"
 | 
			
		||||
 | 
			
		||||
let botClient = TelegramBotClient (config.token, new HttpClient())
 | 
			
		||||
 | 
			
		||||
let youtubeDlClient =
 | 
			
		||||
| 
						 | 
				
			
			@ -56,5 +57,9 @@ botClient.StartReceiving(
 | 
			
		|||
)
 | 
			
		||||
 | 
			
		||||
Logging.logger.Information("Я родился")
 | 
			
		||||
 | 
			
		||||
Console.ReadKey() |> ignore
 | 
			
		||||
Console.CancelKeyPress |> Event.add (fun _ -> cancellation.Cancel(); printfn "Сворачиваемся...")
 | 
			
		||||
Async.RunSynchronously(
 | 
			
		||||
    async {
 | 
			
		||||
        while (not(cancellation.Token.IsCancellationRequested)) do
 | 
			
		||||
            do! Async.Sleep 500 |> Async.Ignore
 | 
			
		||||
    })
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue