This repository has been archived on 2024-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
annelin 61a42e63b4 Release 0.9
[UPD] Now gracefully closes all Telegram and XMPP connections when SIGINT received.

I do not fucking know how to deal with memory leaks in Ruby. I tried literally everything.
Unloading TD class, forcing garbage collection, et cetera — nothing helps, it just runs a gig in two days.

So, now we have to kill -INT our transport every... six hours, for example, and monitor/reconnect (for example with systemd).
Fuck ruby & tdlib. Hate.
2019-05-04 05:40:02 +03:00

19 lines
453 B

# Some very important libraries'
require 'yaml'
require 'logger'
require 'xmpp4r'
require 'digest'
require 'base64'
require 'sqlite3'
require 'tdlib-ruby'
require_relative 'inc/telegramclient'
require_relative 'inc/xmppcomponent'
# configuration
Config = YAML.load_file(File.dirname(__FILE__) + '/config.yml')
TelegramClient.configure(Config['telegram']) # configure tdlib
# run
Zhabogram =['xmpp'])