inline keyboard and move to channel with threads
Signed-off-by: Omar Sánchez Pizarro <omar.sanchez@pistacero.net>
This commit is contained in:
@@ -4,6 +4,7 @@ import logging
|
||||
from datalayer.wallapop_article import WallapopArticle
|
||||
import traceback
|
||||
|
||||
REQUEST_SLEEP_TIME = 30
|
||||
REQUEST_RETRY_TIME = 5
|
||||
ERROR_SLEEP_TIME = 60
|
||||
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'
|
||||
@@ -121,7 +122,7 @@ class Worker:
|
||||
for article in articles:
|
||||
if self._meets_item_conditions(article):
|
||||
try:
|
||||
self._queue_manager.add_to_queue(article, self._item_monitoring.get_name())
|
||||
self._queue_manager.add_to_queue(article, self._item_monitoring.get_name(), self._item_monitoring.get_thread_id())
|
||||
except Exception as e:
|
||||
self.logger.error(f"{self._item_monitoring.get_name()} worker crashed: {e}")
|
||||
time.sleep(self._item_monitoring.get_check_every())
|
||||
|
||||
Reference in New Issue
Block a user