More cleanup.

Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
2024-04-23 08:11:15 -04:00
parent 2fdbfb1285
commit ce3c9740b1
4 changed files with 1 additions and 24 deletions

1
.gitignore vendored
View File

@@ -8,3 +8,4 @@
/docs/_build/
/src/*.egg-info/
__pycache__/
.env

View File

@@ -1,4 +0,0 @@
PLEX_SERVER_URL=http://your-plex-server-url
PLEX_TOKEN=your-plex-token
DATABASE_URL=postgres://user:password@localhost/database
MAX_TRACKS_QUERIED=1000

View File

@@ -138,11 +138,3 @@ async def update_statistics_timestamps(operation: str) -> None:
f"Unexpected error during statistics timestamp update: {e}"
)
await session.rollback()
# Example usage
if __name__ == "__main__":
import asyncio
asyncio.run(update_statistics_timestamps("start"))
asyncio.run(update_statistics_timestamps("end"))

View File

@@ -1,8 +1,5 @@
"""Handles updating the tracks stored in the database from plex."""
import asyncio
import env
import plex
import sql
from aiologger import Logger
@@ -31,12 +28,3 @@ async def process_tracks(server_url: str, token: str) -> None:
except Exception as e:
await logger.error(f"An error occurred during track processing: {e}")
raise
async def main():
"""Main function to initiate the track processing from the Plex server."""
await process_tracks(env.PLEX_SERVER_URL, env.PLEX_TOKEN)
if __name__ == "__main__":
asyncio.run(main())