Updated worker logic, separate DB cursors, 5-min schedule, and improved error handling.
This commit is contained in:
parent
3adb2d0c99
commit
5846d1310d
2 changed files with 8 additions and 1 deletions
7
.env
Normal file
7
.env
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Variables de entorno para la aplicación Flask y el Worker
|
||||||
|
SECRET_KEY=ea562a726190aca49a77b16111139c0094628017cf793a97
|
||||||
|
DB_HOST=localhost
|
||||||
|
DB_PORT=5432
|
||||||
|
DB_NAME=rss
|
||||||
|
DB_USER=rss
|
||||||
|
DB_PASS=x
|
||||||
|
|
@ -35,7 +35,7 @@ if __name__ == '__main__':
|
||||||
scheduler.add_job(
|
scheduler.add_job(
|
||||||
fetch_and_store,
|
fetch_and_store,
|
||||||
"interval",
|
"interval",
|
||||||
minutes=15,
|
minutes=3,
|
||||||
id="rss_job",
|
id="rss_job",
|
||||||
next_run_time=datetime.utcnow() + timedelta(seconds=10)
|
next_run_time=datetime.utcnow() + timedelta(seconds=10)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue