implement automated job scraping scheduler with retry logic and logging

This commit is contained in:
2025-11-01 18:00:59 +01:00
parent 8e3a6f4f41
commit 504dc8e2b0
5 changed files with 109 additions and 1 deletions

12
main.py
View File

@@ -4,8 +4,20 @@ starts webserver
"""
import web.app as app
import threading
from web.craigslist import start_scheduler
def start_background_scheduler():
"""Start the scheduler in a background thread."""
scheduler_thread = threading.Thread(target=start_scheduler, daemon=True)
scheduler_thread.start()
print("Background scheduler started")
if __name__ == "__main__":
# Start scheduler in background thread
start_background_scheduler()
# start web server
app.main()