diff --git a/telegram_helper.py b/telegram_helper.py index 40e803f..5cc9e92 100644 --- a/telegram_helper.py +++ b/telegram_helper.py @@ -100,19 +100,6 @@ class TelegramHelper: await application.bot.send_message(chat_id=chat_id, text="The application has finished initializing.") os.remove(reboot_file_path) - async def check_for_new_commits(self): - while True: - try: - self.repo.remotes.origin.fetch() - latest_commit = self.repo.head.commit - commit_time = latest_commit.committed_date - if commit_time > self.start_time: - logging.info("New commit detected. Triggering reboot...") - await self.reboot(None, None) - except Exception as e: - logging.error(f"Error checking for new commits: {str(e)}") - await asyncio.sleep(60) # Check every 60 seconds - async def browse(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: await browse_command(update, context, self.bot) @@ -134,7 +121,7 @@ class TelegramHelper: # Check for .doreboot file and send message if it exists asyncio.get_event_loop().create_task(self.check_doreboot_file(application)) - # Start the commit checking task - asyncio.get_event_loop().create_task(self.check_for_new_commits()) + # Commenting out the commit checking task + # asyncio.get_event_loop().create_task(self.check_for_new_commits()) application.run_polling() \ No newline at end of file