mirror of
https://github.com/house-of-vanity/gaspar.git
synced 2025-07-07 02:34:06 +00:00
Fix timings
This commit is contained in:
@ -10,7 +10,7 @@ from .database import DataBase
|
||||
from .tools import format_topic
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
level=logging.DEBUG,
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -36,6 +36,7 @@ def update_watcher(bot):
|
||||
for alert in raw:
|
||||
alerts.append(alert['id'])
|
||||
log.info("Checking for updates. Configured interval: %sh , [%s secs]", UPDATE_INTERVAL/60/60, UPDATE_INTERVAL)
|
||||
log.info("Checking alert %s", alert['topic_title'])
|
||||
if update(alert['id']):
|
||||
log.info("Found update for [%s] %s", torrent.meta['id'], torrent.meta['topic_title'])
|
||||
reg_time = datetime.utcfromtimestamp(int(torrent.meta['reg_time'])
|
||||
@ -50,7 +51,7 @@ def update_watcher(bot):
|
||||
subs = torrent.db.get_subscribers(alert['id'])
|
||||
for sub in subs:
|
||||
bot.sendMessage(sub, msg, parse_mode='HTML', disable_web_page_preview=True)
|
||||
time.sleep(60)
|
||||
time.sleep(10)
|
||||
time.sleep(UPDATE_INTERVAL)
|
||||
update_thread = threading.Thread(target=__thread)
|
||||
update_thread.start()
|
||||
|
Reference in New Issue
Block a user