summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2026-03-13 14:22:48 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2026-03-13 14:23:10 +0100
commit90ad5395f6310da86fee9a29503e58ea74f3078b (patch)
tree9f2ad3cf539eaf338ed2d9afbf9f1f4d41cd39a8
parentc9e2341a5b1e8dc03ba6e43c4e61ed2e5f4038c9 (diff)
Remove legacy stuff [skip ci]
-rw-r--r--routes.json442
-rw-r--r--src/common/stop_schedule.proto51
-rw-r--r--src/delay_collector/.env.example16
-rw-r--r--src/delay_collector/DB_SETUP.md71
-rw-r--r--src/delay_collector/database.py125
-rw-r--r--src/delay_collector/delay-collector.service33
-rw-r--r--src/delay_collector/main.py218
-rw-r--r--src/delay_collector/pyproject.toml11
-rw-r--r--src/delay_collector/schema.sql41
-rw-r--r--src/delay_collector/uv.lock142
10 files changed, 0 insertions, 1150 deletions
diff --git a/routes.json b/routes.json
deleted file mode 100644
index 7b4cc00..0000000
--- a/routes.json
+++ /dev/null
@@ -1,442 +0,0 @@
-[
- {
- "id": "vitrasa:8",
- "shortName": "A",
- "longName": "ARENAL – PORTO / UNIVERSIDADE",
- "color": "#77298F",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 66
- },
- {
- "id": "vitrasa:104",
- "shortName": "H",
- "longName": "NAVIA - BOUZAS - HOSPITAL ALVARO CUNQUEIRO",
- "color": "#0060A8",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 1
- },
- {
- "id": "vitrasa:751",
- "shortName": "LZD",
- "longName": "STELLANTIS - ALV. CUNQUEIRO",
- "color": "#3D4EA7",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 2
- },
- {
- "id": "vitrasa:304",
- "shortName": "PTL",
- "longName": "PARQUE TECNOLÓXICO",
- "color": "#96DC99",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 2
- },
- {
- "id": "vitrasa:1",
- "shortName": "C1",
- "longName": "CIRCULAR CENTRO",
- "color": "#ED4713",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 91
- },
- {
- "id": "vitrasa:101",
- "shortName": "H1",
- "longName": "POLICARPO SANZ – HOSPITAL ÁLVARO CUNQUEIRO",
- "color": "#0060A8",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 30
- },
- {
- "id": "vitrasa:30",
- "shortName": "N1",
- "longName": "SAMIL – BUENOS AIRES",
- "color": "#C44848",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 8
- },
- {
- "id": "vitrasa:301",
- "shortName": "PSA1",
- "longName": "STELLANTIS - G.BARBON",
- "color": "#009900",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 4
- },
- {
- "id": "vitrasa:201",
- "shortName": "U1",
- "longName": "LANZADEIRA PZA. AMÉRICA – UNIVERSIDADE",
- "color": "#AC6404",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 71
- },
- {
- "id": "vitrasa:102",
- "shortName": "H2",
- "longName": "GREGORIO ESPINO – HOSPITAL ÁLVARO CUNQU",
- "color": "#0060A8",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 47
- },
- {
- "id": "vitrasa:202",
- "shortName": "U2",
- "longName": "LANZADEIRA PZA. DE ESPAÑA – UNIVERSIDADE",
- "color": "#AC6404",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 66
- },
- {
- "id": "vitrasa:3001",
- "shortName": "C3d",
- "longName": "BOUZAS/COIA – ENCARNACIÓN Por G. BARBÓN",
- "color": "#FFCC00",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 120
- },
- {
- "id": "vitrasa:3002",
- "shortName": "C3i",
- "longName": "BOUZAS/COIA – ENCARNACIÓN por TRV. VIGO",
- "color": "#FFCC00",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 122
- },
- {
- "id": "vitrasa:105",
- "shortName": "H3",
- "longName": "GARCÍA BARBÓN – HOSPITAL ÁLVARO CUNQUEIRO",
- "color": "#0060A8",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 4
- },
- {
- "id": "vitrasa:4001",
- "shortName": "4A",
- "longName": "ARAGÓN - COIA",
- "color": "#009900",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 61
- },
- {
- "id": "vitrasa:4003",
- "shortName": "4C",
- "longName": "G. ESPINO - COIA",
- "color": "#009900",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 53
- },
- {
- "id": "vitrasa:3305",
- "shortName": "N4",
- "longName": "NAVIA - G. ESPINO",
- "color": "#C44848",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 0
- },
- {
- "id": "vitrasa:4004",
- "shortName": "PSA4",
- "longName": "STELLANTIS - G. BARBON",
- "color": "#009900",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 3
- },
- {
- "id": "vitrasa:5001",
- "shortName": "5A",
- "longName": "NAVIA-TRV. DE VIGO",
- "color": "#CCAFAF",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 61
- },
- {
- "id": "vitrasa:5004",
- "shortName": "5B",
- "longName": "NAVIA-S. BADÍA",
- "color": "#DFD5D5",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 61
- },
- {
- "id": "vitrasa:6",
- "shortName": "6",
- "longName": "HOSP. ALVARO CUNQUEIRO - BEADE – PZA. ESPAÑA",
- "color": "#CC3399",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 33
- },
- {
- "id": "vitrasa:7",
- "shortName": "7",
- "longName": "PZA. ESPAÑA – GARRIDA / ZAMÁNS / SOBREIRA",
- "color": "#96DC99",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 67
- },
- {
- "id": "vitrasa:9002",
- "shortName": "9B",
- "longName": "P. SANZ - RABADEIRA",
- "color": "#F4CA8C",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 34
- },
- {
- "id": "vitrasa:10",
- "shortName": "10",
- "longName": "TEIS – CANIDO – SAIÁNS",
- "color": "#993300",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 36
- },
- {
- "id": "vitrasa:11",
- "shortName": "11",
- "longName": "SAN MIGUEL - CABRAL",
- "color": "#D9556D",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 65
- },
- {
- "id": "vitrasa:1201",
- "shortName": "12A",
- "longName": "SAIÁNS – MUÍÑOS – HOSP. MEIXOEIRO",
- "color": "#6A96BE",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 34
- },
- {
- "id": "vitrasa:1202",
- "shortName": "12B",
- "longName": "HOSP. ALVARO CUNQUEIRO – HOSP. MEIXOEIRO",
- "color": "#6A96BE",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 33
- },
- {
- "id": "vitrasa:13",
- "shortName": "13",
- "longName": "TEIXUGUEIRAS – HOSP. MEIXOEIRO",
- "color": "#00B0F0",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 47
- },
- {
- "id": "vitrasa:14",
- "shortName": "14",
- "longName": "CHANS – GRAN VÍA",
- "color": "#818E7E",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 35
- },
- {
- "id": "vitrasa:1501",
- "shortName": "15A",
- "longName": "CABRAL - SAMIL",
- "color": "#D8A8CE",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 68
- },
- {
- "id": "vitrasa:1506",
- "shortName": "15B",
- "longName": "HOSP. MEIXOEIRO - SAMIL / NAVIA",
- "color": "#D8A8CE",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 33
- },
- {
- "id": "vitrasa:1507",
- "shortName": "15C",
- "longName": "UNIVERSIDADE – SAMIL / NAVIA",
- "color": "#D8A8CE",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 35
- },
- {
- "id": "vitrasa:16",
- "shortName": "16",
- "longName": "COIA – ESTACIÓN FF.CC. (GUIXAR)",
- "color": "#818E7E",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 32
- },
- {
- "id": "vitrasa:17",
- "shortName": "17",
- "longName": "MATAMÁ (BALSA) – A GUÍA / RÍOS",
- "color": "#D6F51F",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 65
- },
- {
- "id": "vitrasa:18",
- "shortName": "18A",
- "longName": "AREAL/COLÓN - SÁRDOMA/POULEIRA",
- "color": "#D450A8",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 28
- },
- {
- "id": "vitrasa:1801",
- "shortName": "18B",
- "longName": "URZAIZ / P.ESPAÑA - POULEIRA",
- "color": "#D450A8",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 9
- },
- {
- "id": "vitrasa:1802",
- "shortName": "18H",
- "longName": "URZAIZ / P. ESPAÑA - H. ALV. CUNQUEIRO",
- "color": "#D450A8",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 6
- },
- {
- "id": "vitrasa:23",
- "shortName": "23",
- "longName": "M. ECHEGARAY – G. ESPINO",
- "color": "#B9C8E4",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 48
- },
- {
- "id": "vitrasa:24",
- "shortName": "24",
- "longName": "POULO – ESTACIÓN FF.CC. (GUIXAR)",
- "color": "#BFBFBF",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 30
- },
- {
- "id": "vitrasa:25",
- "shortName": "25",
- "longName": "PZA. ESPAÑA – SABAXÁNS / CAEIRO",
- "color": "#AC6404",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 31
- },
- {
- "id": "vitrasa:27",
- "shortName": "27",
- "longName": "BEADE (C. CULTURAL) – RABADEIRA",
- "color": "#704A2A",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 34
- },
- {
- "id": "vitrasa:28",
- "shortName": "28",
- "longName": "VIGOZOO - SAN PAIO - BOUZAS",
- "color": "#B0BDFE",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 14
- },
- {
- "id": "vitrasa:29",
- "shortName": "29",
- "longName": "FRAGOSELO / S. ANDRÉS – PZA. ESPAÑA",
- "color": "#F8B85A",
- "textColor": "#000000",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 56
- },
- {
- "id": "vitrasa:31",
- "shortName": "31",
- "longName": "SAN LOURENZO – HOSP. MEIXOEIRO",
- "color": "#F57F00",
- "textColor": "#FFFFFF",
- "sortOrder": null,
- "agencyName": "Viguesa de Transportes S.L.",
- "tripCount": 60
- }
-]
diff --git a/src/common/stop_schedule.proto b/src/common/stop_schedule.proto
deleted file mode 100644
index 74268f8..0000000
--- a/src/common/stop_schedule.proto
+++ /dev/null
@@ -1,51 +0,0 @@
-syntax = "proto3";
-
-package proto;
-
-option csharp_namespace = "Costasdev.Busurbano.Backend.Types";
-
-message Epsg25829 {
- double x = 1;
- double y = 2;
-}
-
-message StopArrivals {
- message ScheduledArrival {
- string service_id = 1;
- string trip_id = 2;
- string line = 3;
- string route = 4;
- string shape_id = 5;
- double shape_dist_traveled = 6;
-
- uint32 stop_sequence = 11;
- repeated string next_streets = 12;
-
- string starting_code = 21;
- string starting_name = 22;
- string starting_time = 23;
-
- string calling_time = 33;
- uint32 calling_ssm = 34;
-
- string terminus_code = 41;
- string terminus_name = 42;
- string terminus_time = 43;
-
- // Shape ID of the previous trip when the bus comes from another trip that ends at the starting point
- string previous_trip_shape_id = 51;
- }
-
- string stop_id = 1;
-
- Epsg25829 location = 3;
-
- repeated ScheduledArrival arrivals = 5;
-}
-
-
-message Shape {
- string shape_id = 1;
-
- repeated Epsg25829 points = 3;
-}
diff --git a/src/delay_collector/.env.example b/src/delay_collector/.env.example
deleted file mode 100644
index 80ff054..0000000
--- a/src/delay_collector/.env.example
+++ /dev/null
@@ -1,16 +0,0 @@
-# Collection frequency in seconds (default: 30)
-FREQUENCY_SECONDS=36
-
-# PostgreSQL Database Configuration
-DB_HOST=localhost
-DB_PORT=5432
-DB_NAME=busurbano
-DB_USER=postgres
-DB_PASSWORD=your_password_here
-
-# Service hours (Madrid timezone)
-# The collector will only run during these hours
-SERVICE_START_HOUR=7 # Start at 7:00 AM
-SERVICE_END_HOUR=23 # End at 11:30 PM
-SERVICE_END_MINUTE=30
-SERVICE_TIMEZONE=Europe/Madrid
diff --git a/src/delay_collector/DB_SETUP.md b/src/delay_collector/DB_SETUP.md
deleted file mode 100644
index fedfb93..0000000
--- a/src/delay_collector/DB_SETUP.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# PostgreSQL Database Setup
-
-This document describes how to set up the PostgreSQL database for the delay collector.
-
-## Prerequisites
-
-- PostgreSQL 18
-- psql
-
-## Database Setup
-
-### 1. Create Database and User
-
-Connect to PostgreSQL as superuser:
-
-```bash
-sudo -u postgres psql
-```
-
-Create database and user:
-
-```sql
--- Create database
-CREATE DATABASE busurbano;
-
--- Create user
-CREATE USER busurbano_collector WITH PASSWORD 'your_secure_password';
-
--- Grant privileges
-GRANT CONNECT ON DATABASE busurbano TO busurbano_collector;
-\c busurbano
-GRANT USAGE ON SCHEMA public TO busurbano_collector;
-GRANT INSERT, SELECT ON ALL TABLES IN SCHEMA public TO busurbano_collector;
-GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO busurbano_collector;
-ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT INSERT, SELECT ON TABLES TO busurbano_collector;
-ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT USAGE, SELECT ON SEQUENCES TO busurbano_collector;
-```
-
-### 2. Create Schema
-
-Run the schema file:
-
-```bash
-psql -U postgres -d busurbano -f schema.sql
-```
-
-Or from within psql:
-
-```sql
-\c busurbano
-\i schema.sql
-```
-
-## Configuration
-
-Update your `.env` file:
-
-```bash
-cp .env.example .env
-nano .env
-```
-
-Set the following:
-
-```env
-DB_HOST=localhost
-DB_PORT=5432
-DB_NAME=busurbano
-DB_USER=busurbano_collector
-DB_PASSWORD=your_secure_password
-```
diff --git a/src/delay_collector/database.py b/src/delay_collector/database.py
deleted file mode 100644
index b3f58f0..0000000
--- a/src/delay_collector/database.py
+++ /dev/null
@@ -1,125 +0,0 @@
-"""Database module for storing delay observations."""
-
-import os
-from datetime import datetime
-from typing import List, Dict
-
-import psycopg2
-from psycopg2.extras import execute_values
-
-
-def get_connection():
- """Get a PostgreSQL database connection."""
- conn = psycopg2.connect(
- host=os.getenv("DB_HOST", "localhost"),
- port=int(os.getenv("DB_PORT", "5432")),
- database=os.getenv("DB_NAME", "busurbano"),
- user=os.getenv("DB_USER", "postgres"),
- password=os.getenv("DB_PASSWORD", "")
- )
- return conn
-
-
-def insert_observations(
- observations: List[Dict],
- stop_code: int,
- observed_at: datetime
-) -> int:
- """
- Insert delay observations into the database.
-
- Args:
- observations: List of observation dicts with keys:
- line, route, service_id, trip_id, running, scheduled_minutes, real_time_minutes
- stop_code: The stop code where observations were made
- observed_at: The datetime when observations were collected
-
- Returns:
- Number of records inserted
- """
- if not observations:
- return 0
-
- conn = get_connection()
- try:
- cursor = conn.cursor()
-
- insert_sql = """
- INSERT INTO delay_observations (
- observed_at,
- stop_code,
- line,
- route,
- service_id,
- trip_id,
- running,
- scheduled_minutes,
- real_time_minutes
- ) VALUES %s
- """
-
- records = [
- (
- observed_at,
- stop_code,
- obs["line"],
- obs["route"],
- obs["service_id"],
- obs["trip_id"],
- obs["running"],
- obs["scheduled_minutes"],
- obs["real_time_minutes"],
- )
- for obs in observations
- ]
-
- execute_values(cursor, insert_sql, records)
- conn.commit()
- return len(records)
- finally:
- cursor.close()
- conn.close()
-
-
-def get_statistics() -> Dict:
- """Get basic statistics about the collected data."""
- conn = get_connection()
- cursor = conn.cursor()
- try:
- # Total observations
- cursor.execute("SELECT COUNT(*) as total FROM delay_observations")
- result = cursor.fetchone()
- total = result[0] if result else 0
-
- # Date range
- cursor.execute(
- """
- SELECT
- MIN(observed_at) as first_observation,
- MAX(observed_at) as last_observation
- FROM delay_observations
- """
- )
- date_range = cursor.fetchone()
-
- # Unique stops and lines
- cursor.execute(
- """
- SELECT
- COUNT(DISTINCT stop_code) as unique_stops,
- COUNT(DISTINCT line) as unique_lines
- FROM delay_observations
- """
- )
- unique_counts = cursor.fetchone()
-
- return {
- "total_observations": total,
- "first_observation": str(date_range[0]) if date_range and date_range[0] else None,
- "last_observation": str(date_range[1]) if date_range and date_range[1] else None,
- "unique_stops": unique_counts[0] if unique_counts else 0,
- "unique_lines": unique_counts[1] if unique_counts else 0,
- }
- finally:
- cursor.close()
- conn.close()
diff --git a/src/delay_collector/delay-collector.service b/src/delay_collector/delay-collector.service
deleted file mode 100644
index 926cc04..0000000
--- a/src/delay_collector/delay-collector.service
+++ /dev/null
@@ -1,33 +0,0 @@
-[Unit]
-Description=Busurbano Delay Collector Service
-After=network-online.target
-Wants=network-online.target
-
-[Service]
-Type=simple
-User=app
-Group=app
-WorkingDirectory=/opt/delay_collector
-EnvironmentFile=/opt/delay_collector/.env
-
-# Restart policy - always restart if it crashes
-Restart=always
-RestartSec=10
-
-# Start the Python script
-ExecStart=/usr/bin/python3 /opt/busurbano/delay_collector/main.py
-
-# Logging
-StandardOutput=journal
-StandardError=journal
-SyslogIdentifier=delay-collector
-
-# Security hardening
-NoNewPrivileges=true
-PrivateTmp=true
-ProtectSystem=strict
-ProtectHome=true
-ReadWritePaths=/opt/busurbano/delay_collector
-
-[Install]
-WantedBy=multi-user.target
diff --git a/src/delay_collector/main.py b/src/delay_collector/main.py
deleted file mode 100644
index cab6cf6..0000000
--- a/src/delay_collector/main.py
+++ /dev/null
@@ -1,218 +0,0 @@
-import os
-import sys
-from datetime import datetime
-from time import sleep, time
-from zoneinfo import ZoneInfo
-import logging
-from pathlib import Path
-
-import requests
-
-from database import insert_observations
-
-
-STOP_CODES = [
- 14227, # (Torrecedeira 86)
- 8460, # (Torrecedeira 105)
- 20206, # (Marqués Valladares ft. 19)
- 14264, # (Urzáiz-Príncipe)
- 8770, # (Urzáiz, 13)
- 5610, # (Gran Vía, 12)
- 5660, # (Gran Vía, 19)
- 6940, # (Praza América 3)
- 2780, # (Camelias, 135)
- 8630, # (Travesía 7)
- 8610, # (Travesía 8)
- 5410, # (Fragoso, 12)
- 1360, # (Castrelos, 16)
- 8040, # (Sanjurjo Badía, 167)
- 14132, # (Sanjurjo Badía, 252)
-]
-
-FREQUENCY_SECONDS = int(os.getenv("FREQUENCY_SECONDS", "30"))
-SERVICE_START_HOUR = int(os.getenv("SERVICE_START_HOUR", "7")) # 7 AM
-SERVICE_START_MINUTE = int(os.getenv("SERVICE_START_MINUTE", "00")) # 7 AM
-SERVICE_END_HOUR = int(os.getenv("SERVICE_END_HOUR", "23")) # 11 PM
-SERVICE_END_MINUTE = int(os.getenv("SERVICE_END_MINUTE", "00")) # 11:30 PM
-SERVICE_TIMEZONE = os.getenv("SERVICE_TIMEZONE", "Europe/Madrid")
-
-
-def setup_logging():
- """Configure logging for daemon operation."""
- # Configure logging to both file and console
- logging.basicConfig(
- level=logging.INFO,
- format='%(asctime)s - %(levelname)s - %(message)s',
- handlers=[
- logging.StreamHandler(sys.stdout)
- ]
- )
- return logging.getLogger(__name__)
-
-
-def is_within_service_hours() -> bool:
- """Check if current time is within configured service hours (Madrid time)."""
- tz = ZoneInfo(SERVICE_TIMEZONE)
- now = datetime.now(tz)
-
- current_hour = now.hour
- current_minute = now.minute
-
- # Check if before start time
- if current_hour < SERVICE_START_HOUR:
- return False
- if current_hour == SERVICE_START_HOUR and current_minute < SERVICE_START_MINUTE:
- return False
-
- # Check if after end time
- if current_hour > SERVICE_END_HOUR:
- return False
- if current_hour == SERVICE_END_HOUR and current_minute >= SERVICE_END_MINUTE:
- return False
-
- return True
-
-
-def wait_until_service_hours(logger):
- """Wait until service hours begin."""
- tz = ZoneInfo(SERVICE_TIMEZONE)
-
- while not is_within_service_hours():
- now = datetime.now(tz)
- logger.info(
- f"Outside service hours (current time: {now.strftime('%H:%M %Z')}). Waiting...")
- # Check every 5 minutes
- sleep(300)
-
-
-def download_consolidated_data(stop_code: int) -> list[dict]:
- URL = f"https://busurbano.costas.dev/api/vigo/GetConsolidatedCirculations?stopId={stop_code}"
-
- response = requests.get(URL)
- if response.status_code == 200:
- return response.json()
- else:
- return []
-
-
-def get_consolidated_data(stop_code: int):
- raw_data = download_consolidated_data(stop_code)
-
- processed_items = []
- for item in raw_data:
- line = item.get("line")
- route = item.get("route")
- schedule = item.get("schedule", None)
- real_time = item.get("realTime", None)
-
- # If either is missing, skip this item
- if schedule is None or real_time is None:
- continue
-
- processed_items.append(
- {
- "line": line,
- "route": route,
- "service_id": schedule.get("serviceId"),
- "trip_id": schedule.get("tripId"),
- "running": schedule.get("running", False),
- "scheduled_minutes": schedule.get("minutes"),
- "real_time_minutes": real_time.get("minutes"),
- }
- )
-
- return processed_items
-
-
-def main():
- """Main collection loop that continuously gathers and stores delay data."""
- # Setup logging
- logger = setup_logging()
-
- # Log system time on startup
- tz = ZoneInfo(SERVICE_TIMEZONE)
- system_time = datetime.now(tz)
- logger.info(f"=== Delay Collector Starting ===")
- logger.info(f"System time: {system_time.strftime('%Y-%m-%d %H:%M:%S %Z')}")
- logger.info(
- f"Database: {os.getenv('DB_HOST', 'localhost')}:{os.getenv('DB_PORT', '5432')}/{os.getenv('DB_NAME', 'busurbano')}")
-
- # Calculate spacing between requests to evenly distribute them
- # We want to complete all stops every FREQUENCY_SECONDS, so space them evenly
- request_interval = FREQUENCY_SECONDS / len(STOP_CODES)
-
- logger.info(f"Monitoring {len(STOP_CODES)} stops")
- logger.info(f"Collection cycle: {FREQUENCY_SECONDS} seconds (all stops)")
- logger.info(
- f"Request interval: {request_interval:.2f} seconds (between stops)")
- logger.info(
- f"Service hours: {SERVICE_START_HOUR}:00 - {SERVICE_END_HOUR}:{SERVICE_END_MINUTE:02d} {SERVICE_TIMEZONE}")
- logger.info("Press Ctrl+C to stop\n")
-
- total_records = 0
-
- try:
- while True:
- # Check if within service hours
- if not is_within_service_hours():
- tz = ZoneInfo(SERVICE_TIMEZONE)
- now = datetime.now(tz)
- logger.info(
- f"Outside service hours (current: {now.strftime('%H:%M %Z')}). Pausing collection.")
- logger.info(f"Total records collected today: {total_records}")
-
- # Wait until service hours resume
- wait_until_service_hours(logger)
- logger.info("Service hours resumed. Resuming collection...")
- # Reset daily counter
- total_records = 0
- continue
-
- cycle_start = time()
-
- # Collect from each stop, evenly spaced
- for stop_code in STOP_CODES:
- request_start = time()
-
- try:
- # Capture the exact time of observation
- observed_at = datetime.now(ZoneInfo('UTC'))
-
- # Fetch and process data
- data = get_consolidated_data(stop_code)
-
- # Store in database
- if data:
- records_inserted = insert_observations(
- data, stop_code, observed_at)
- total_records += records_inserted
- logger.info(
- f"Stop {stop_code}: {records_inserted} observations (Total today: {total_records})")
- else:
- logger.debug(f"Stop {stop_code}: No observations")
-
- except Exception as e:
- logger.error(f"Error processing stop {stop_code}: {e}")
-
- # Sleep to maintain even spacing between requests
- request_elapsed = time() - request_start
- sleep_time = request_interval - request_elapsed
- if sleep_time > 0:
- sleep(sleep_time)
-
- # After completing all stops, wait if we finished early to maintain the cycle time
- cycle_elapsed = time() - cycle_start
- remaining_time = FREQUENCY_SECONDS - cycle_elapsed
- if remaining_time > 0:
- logger.debug(
- f"Cycle completed in {cycle_elapsed:.1f}s, waiting {remaining_time:.1f}s")
- sleep(remaining_time)
-
- except KeyboardInterrupt:
- logger.info("\n=== Collection stopped by user ===")
- logger.info(f"Total records collected: {total_records}")
- sys.exit(0)
-
-
-if __name__ == "__main__":
- main()
diff --git a/src/delay_collector/pyproject.toml b/src/delay_collector/pyproject.toml
deleted file mode 100644
index 7d1c927..0000000
--- a/src/delay_collector/pyproject.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-[project]
-name = "delay-collector"
-version = "0.1.0"
-description = "Add your description here"
-readme = "README.md"
-requires-python = ">=3.13"
-dependencies = [
- "psycopg2-binary>=2.9.11",
- "requests>=2.32.5",
- "tzdata>=2025.2",
-]
diff --git a/src/delay_collector/schema.sql b/src/delay_collector/schema.sql
deleted file mode 100644
index c16ecd3..0000000
--- a/src/delay_collector/schema.sql
+++ /dev/null
@@ -1,41 +0,0 @@
--- Database schema for bus delay observations (PostgreSQL)
--- This stores real-time vs scheduled arrival data for analyzing delays
--- Partitioned by month for optimal performance with large datasets
-
-CREATE TABLE IF NOT EXISTS delay_observations (
- id BIGSERIAL NOT NULL,
- observed_at TIMESTAMPTZ NOT NULL,
- stop_code INTEGER NOT NULL,
- line VARCHAR(10) NOT NULL,
- route VARCHAR(100) NOT NULL,
- service_id VARCHAR(50) NOT NULL,
- trip_id VARCHAR(50) NOT NULL,
- running BOOLEAN NOT NULL,
- scheduled_minutes SMALLINT NOT NULL,
- real_time_minutes SMALLINT NOT NULL,
- delay_minutes SMALLINT GENERATED ALWAYS AS (real_time_minutes - scheduled_minutes) STORED,
- PRIMARY KEY (id, observed_at)
-) PARTITION BY RANGE (observed_at);
-
--- Create initial partitions (monthly)
--- You should create new partitions before each month starts
-CREATE TABLE IF NOT EXISTS delay_observations_2025_11 PARTITION OF delay_observations
- FOR VALUES FROM ('2025-11-01') TO ('2025-12-01');
-
-CREATE TABLE IF NOT EXISTS delay_observations_2025_12 PARTITION OF delay_observations
- FOR VALUES FROM ('2025-12-01') TO ('2026-01-01');
-
-CREATE TABLE IF NOT EXISTS delay_observations_2026_01 PARTITION OF delay_observations
- FOR VALUES FROM ('2026-01-01') TO ('2026-02-01');
-
--- Indexes for efficient querying (created on parent table, applied to all partitions)
-CREATE INDEX IF NOT EXISTS idx_observed_at ON delay_observations(observed_at DESC);
-CREATE INDEX IF NOT EXISTS idx_stop_code ON delay_observations(stop_code);
-CREATE INDEX IF NOT EXISTS idx_line ON delay_observations(line);
-CREATE INDEX IF NOT EXISTS idx_trip_id ON delay_observations(trip_id, observed_at DESC);
-CREATE INDEX IF NOT EXISTS idx_stop_line ON delay_observations(stop_code, line);
-CREATE INDEX IF NOT EXISTS idx_running ON delay_observations(running) WHERE running = true;
-
--- Partitioning by date for better performance (optional, uncomment if needed)
--- This requires converting to a partitioned table
--- ALTER TABLE delay_observations PARTITION BY RANGE (observation_date);
diff --git a/src/delay_collector/uv.lock b/src/delay_collector/uv.lock
deleted file mode 100644
index df3b5ef..0000000
--- a/src/delay_collector/uv.lock
+++ /dev/null
@@ -1,142 +0,0 @@
-version = 1
-revision = 3
-requires-python = ">=3.13"
-
-[[package]]
-name = "certifi"
-version = "2025.11.12"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/a2/8c/58f469717fa48465e4a50c014a0400602d3c437d7c0c468e17ada824da3a/certifi-2025.11.12.tar.gz", hash = "sha256:d8ab5478f2ecd78af242878415affce761ca6bc54a22a27e026d7c25357c3316", size = 160538, upload-time = "2025-11-12T02:54:51.517Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/70/7d/9bc192684cea499815ff478dfcdc13835ddf401365057044fb721ec6bddb/certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b", size = 159438, upload-time = "2025-11-12T02:54:49.735Z" },
-]
-
-[[package]]
-name = "charset-normalizer"
-version = "3.4.4"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", size = 129418, upload-time = "2025-10-14T04:42:32.879Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/97/45/4b3a1239bbacd321068ea6e7ac28875b03ab8bc0aa0966452db17cd36714/charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794", size = 208091, upload-time = "2025-10-14T04:41:13.346Z" },
- { url = "https://files.pythonhosted.org/packages/7d/62/73a6d7450829655a35bb88a88fca7d736f9882a27eacdca2c6d505b57e2e/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed", size = 147936, upload-time = "2025-10-14T04:41:14.461Z" },
- { url = "https://files.pythonhosted.org/packages/89/c5/adb8c8b3d6625bef6d88b251bbb0d95f8205831b987631ab0c8bb5d937c2/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72", size = 144180, upload-time = "2025-10-14T04:41:15.588Z" },
- { url = "https://files.pythonhosted.org/packages/91/ed/9706e4070682d1cc219050b6048bfd293ccf67b3d4f5a4f39207453d4b99/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328", size = 161346, upload-time = "2025-10-14T04:41:16.738Z" },
- { url = "https://files.pythonhosted.org/packages/d5/0d/031f0d95e4972901a2f6f09ef055751805ff541511dc1252ba3ca1f80cf5/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede", size = 158874, upload-time = "2025-10-14T04:41:17.923Z" },
- { url = "https://files.pythonhosted.org/packages/f5/83/6ab5883f57c9c801ce5e5677242328aa45592be8a00644310a008d04f922/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894", size = 153076, upload-time = "2025-10-14T04:41:19.106Z" },
- { url = "https://files.pythonhosted.org/packages/75/1e/5ff781ddf5260e387d6419959ee89ef13878229732732ee73cdae01800f2/charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1", size = 150601, upload-time = "2025-10-14T04:41:20.245Z" },
- { url = "https://files.pythonhosted.org/packages/d7/57/71be810965493d3510a6ca79b90c19e48696fb1ff964da319334b12677f0/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490", size = 150376, upload-time = "2025-10-14T04:41:21.398Z" },
- { url = "https://files.pythonhosted.org/packages/e5/d5/c3d057a78c181d007014feb7e9f2e65905a6c4ef182c0ddf0de2924edd65/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44", size = 144825, upload-time = "2025-10-14T04:41:22.583Z" },
- { url = "https://files.pythonhosted.org/packages/e6/8c/d0406294828d4976f275ffbe66f00266c4b3136b7506941d87c00cab5272/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133", size = 162583, upload-time = "2025-10-14T04:41:23.754Z" },
- { url = "https://files.pythonhosted.org/packages/d7/24/e2aa1f18c8f15c4c0e932d9287b8609dd30ad56dbe41d926bd846e22fb8d/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3", size = 150366, upload-time = "2025-10-14T04:41:25.27Z" },
- { url = "https://files.pythonhosted.org/packages/e4/5b/1e6160c7739aad1e2df054300cc618b06bf784a7a164b0f238360721ab86/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e", size = 160300, upload-time = "2025-10-14T04:41:26.725Z" },
- { url = "https://files.pythonhosted.org/packages/7a/10/f882167cd207fbdd743e55534d5d9620e095089d176d55cb22d5322f2afd/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc", size = 154465, upload-time = "2025-10-14T04:41:28.322Z" },
- { url = "https://files.pythonhosted.org/packages/89/66/c7a9e1b7429be72123441bfdbaf2bc13faab3f90b933f664db506dea5915/charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac", size = 99404, upload-time = "2025-10-14T04:41:29.95Z" },
- { url = "https://files.pythonhosted.org/packages/c4/26/b9924fa27db384bdcd97ab83b4f0a8058d96ad9626ead570674d5e737d90/charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14", size = 107092, upload-time = "2025-10-14T04:41:31.188Z" },
- { url = "https://files.pythonhosted.org/packages/af/8f/3ed4bfa0c0c72a7ca17f0380cd9e4dd842b09f664e780c13cff1dcf2ef1b/charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2", size = 100408, upload-time = "2025-10-14T04:41:32.624Z" },
- { url = "https://files.pythonhosted.org/packages/2a/35/7051599bd493e62411d6ede36fd5af83a38f37c4767b92884df7301db25d/charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd", size = 207746, upload-time = "2025-10-14T04:41:33.773Z" },
- { url = "https://files.pythonhosted.org/packages/10/9a/97c8d48ef10d6cd4fcead2415523221624bf58bcf68a802721a6bc807c8f/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb", size = 147889, upload-time = "2025-10-14T04:41:34.897Z" },
- { url = "https://files.pythonhosted.org/packages/10/bf/979224a919a1b606c82bd2c5fa49b5c6d5727aa47b4312bb27b1734f53cd/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e", size = 143641, upload-time = "2025-10-14T04:41:36.116Z" },
- { url = "https://files.pythonhosted.org/packages/ba/33/0ad65587441fc730dc7bd90e9716b30b4702dc7b617e6ba4997dc8651495/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14", size = 160779, upload-time = "2025-10-14T04:41:37.229Z" },
- { url = "https://files.pythonhosted.org/packages/67/ed/331d6b249259ee71ddea93f6f2f0a56cfebd46938bde6fcc6f7b9a3d0e09/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191", size = 159035, upload-time = "2025-10-14T04:41:38.368Z" },
- { url = "https://files.pythonhosted.org/packages/67/ff/f6b948ca32e4f2a4576aa129d8bed61f2e0543bf9f5f2b7fc3758ed005c9/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838", size = 152542, upload-time = "2025-10-14T04:41:39.862Z" },
- { url = "https://files.pythonhosted.org/packages/16/85/276033dcbcc369eb176594de22728541a925b2632f9716428c851b149e83/charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6", size = 149524, upload-time = "2025-10-14T04:41:41.319Z" },
- { url = "https://files.pythonhosted.org/packages/9e/f2/6a2a1f722b6aba37050e626530a46a68f74e63683947a8acff92569f979a/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e", size = 150395, upload-time = "2025-10-14T04:41:42.539Z" },
- { url = "https://files.pythonhosted.org/packages/60/bb/2186cb2f2bbaea6338cad15ce23a67f9b0672929744381e28b0592676824/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c", size = 143680, upload-time = "2025-10-14T04:41:43.661Z" },
- { url = "https://files.pythonhosted.org/packages/7d/a5/bf6f13b772fbb2a90360eb620d52ed8f796f3c5caee8398c3b2eb7b1c60d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090", size = 162045, upload-time = "2025-10-14T04:41:44.821Z" },
- { url = "https://files.pythonhosted.org/packages/df/c5/d1be898bf0dc3ef9030c3825e5d3b83f2c528d207d246cbabe245966808d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152", size = 149687, upload-time = "2025-10-14T04:41:46.442Z" },
- { url = "https://files.pythonhosted.org/packages/a5/42/90c1f7b9341eef50c8a1cb3f098ac43b0508413f33affd762855f67a410e/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828", size = 160014, upload-time = "2025-10-14T04:41:47.631Z" },
- { url = "https://files.pythonhosted.org/packages/76/be/4d3ee471e8145d12795ab655ece37baed0929462a86e72372fd25859047c/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec", size = 154044, upload-time = "2025-10-14T04:41:48.81Z" },
- { url = "https://files.pythonhosted.org/packages/b0/6f/8f7af07237c34a1defe7defc565a9bc1807762f672c0fde711a4b22bf9c0/charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", size = 99940, upload-time = "2025-10-14T04:41:49.946Z" },
- { url = "https://files.pythonhosted.org/packages/4b/51/8ade005e5ca5b0d80fb4aff72a3775b325bdc3d27408c8113811a7cbe640/charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", size = 107104, upload-time = "2025-10-14T04:41:51.051Z" },
- { url = "https://files.pythonhosted.org/packages/da/5f/6b8f83a55bb8278772c5ae54a577f3099025f9ade59d0136ac24a0df4bde/charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", size = 100743, upload-time = "2025-10-14T04:41:52.122Z" },
- { url = "https://files.pythonhosted.org/packages/0a/4c/925909008ed5a988ccbb72dcc897407e5d6d3bd72410d69e051fc0c14647/charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", size = 53402, upload-time = "2025-10-14T04:42:31.76Z" },
-]
-
-[[package]]
-name = "delay-collector"
-version = "0.1.0"
-source = { virtual = "." }
-dependencies = [
- { name = "psycopg2-binary" },
- { name = "requests" },
- { name = "tzdata" },
-]
-
-[package.metadata]
-requires-dist = [
- { name = "psycopg2-binary", specifier = ">=2.9.11" },
- { name = "requests", specifier = ">=2.32.5" },
- { name = "tzdata", specifier = ">=2025.2" },
-]
-
-[[package]]
-name = "idna"
-version = "3.11"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902", size = 194582, upload-time = "2025-10-12T14:55:20.501Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" },
-]
-
-[[package]]
-name = "psycopg2-binary"
-version = "2.9.11"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/ac/6c/8767aaa597ba424643dc87348c6f1754dd9f48e80fdc1b9f7ca5c3a7c213/psycopg2-binary-2.9.11.tar.gz", hash = "sha256:b6aed9e096bf63f9e75edf2581aa9a7e7186d97ab5c177aa6c87797cd591236c", size = 379620, upload-time = "2025-10-10T11:14:48.041Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/ff/a8/a2709681b3ac11b0b1786def10006b8995125ba268c9a54bea6f5ae8bd3e/psycopg2_binary-2.9.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b8fb3db325435d34235b044b199e56cdf9ff41223a4b9752e8576465170bb38c", size = 3756572, upload-time = "2025-10-10T11:12:32.873Z" },
- { url = "https://files.pythonhosted.org/packages/62/e1/c2b38d256d0dafd32713e9f31982a5b028f4a3651f446be70785f484f472/psycopg2_binary-2.9.11-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:366df99e710a2acd90efed3764bb1e28df6c675d33a7fb40df9b7281694432ee", size = 3864529, upload-time = "2025-10-10T11:12:36.791Z" },
- { url = "https://files.pythonhosted.org/packages/11/32/b2ffe8f3853c181e88f0a157c5fb4e383102238d73c52ac6d93a5c8bffe6/psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8c55b385daa2f92cb64b12ec4536c66954ac53654c7f15a203578da4e78105c0", size = 4411242, upload-time = "2025-10-10T11:12:42.388Z" },
- { url = "https://files.pythonhosted.org/packages/10/04/6ca7477e6160ae258dc96f67c371157776564679aefd247b66f4661501a2/psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:c0377174bf1dd416993d16edc15357f6eb17ac998244cca19bc67cdc0e2e5766", size = 4468258, upload-time = "2025-10-10T11:12:48.654Z" },
- { url = "https://files.pythonhosted.org/packages/3c/7e/6a1a38f86412df101435809f225d57c1a021307dd0689f7a5e7fe83588b1/psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5c6ff3335ce08c75afaed19e08699e8aacf95d4a260b495a4a8545244fe2ceb3", size = 4166295, upload-time = "2025-10-10T11:12:52.525Z" },
- { url = "https://files.pythonhosted.org/packages/f2/7d/c07374c501b45f3579a9eb761cbf2604ddef3d96ad48679112c2c5aa9c25/psycopg2_binary-2.9.11-cp313-cp313-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:84011ba3109e06ac412f95399b704d3d6950e386b7994475b231cf61eec2fc1f", size = 3983133, upload-time = "2025-10-30T02:55:24.329Z" },
- { url = "https://files.pythonhosted.org/packages/82/56/993b7104cb8345ad7d4516538ccf8f0d0ac640b1ebd8c754a7b024e76878/psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ba34475ceb08cccbdd98f6b46916917ae6eeb92b5ae111df10b544c3a4621dc4", size = 3652383, upload-time = "2025-10-10T11:12:56.387Z" },
- { url = "https://files.pythonhosted.org/packages/2d/ac/eaeb6029362fd8d454a27374d84c6866c82c33bfc24587b4face5a8e43ef/psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b31e90fdd0f968c2de3b26ab014314fe814225b6c324f770952f7d38abf17e3c", size = 3298168, upload-time = "2025-10-10T11:13:00.403Z" },
- { url = "https://files.pythonhosted.org/packages/2b/39/50c3facc66bded9ada5cbc0de867499a703dc6bca6be03070b4e3b65da6c/psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:d526864e0f67f74937a8fce859bd56c979f5e2ec57ca7c627f5f1071ef7fee60", size = 3044712, upload-time = "2025-10-30T02:55:27.975Z" },
- { url = "https://files.pythonhosted.org/packages/9c/8e/b7de019a1f562f72ada81081a12823d3c1590bedc48d7d2559410a2763fe/psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:04195548662fa544626c8ea0f06561eb6203f1984ba5b4562764fbeb4c3d14b1", size = 3347549, upload-time = "2025-10-10T11:13:03.971Z" },
- { url = "https://files.pythonhosted.org/packages/80/2d/1bb683f64737bbb1f86c82b7359db1eb2be4e2c0c13b947f80efefa7d3e5/psycopg2_binary-2.9.11-cp313-cp313-win_amd64.whl", hash = "sha256:efff12b432179443f54e230fdf60de1f6cc726b6c832db8701227d089310e8aa", size = 2714215, upload-time = "2025-10-10T11:13:07.14Z" },
- { url = "https://files.pythonhosted.org/packages/64/12/93ef0098590cf51d9732b4f139533732565704f45bdc1ffa741b7c95fb54/psycopg2_binary-2.9.11-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:92e3b669236327083a2e33ccfa0d320dd01b9803b3e14dd986a4fc54aa00f4e1", size = 3756567, upload-time = "2025-10-10T11:13:11.885Z" },
- { url = "https://files.pythonhosted.org/packages/7c/a9/9d55c614a891288f15ca4b5209b09f0f01e3124056924e17b81b9fa054cc/psycopg2_binary-2.9.11-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e0deeb03da539fa3577fcb0b3f2554a97f7e5477c246098dbb18091a4a01c16f", size = 3864755, upload-time = "2025-10-10T11:13:17.727Z" },
- { url = "https://files.pythonhosted.org/packages/13/1e/98874ce72fd29cbde93209977b196a2edae03f8490d1bd8158e7f1daf3a0/psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9b52a3f9bb540a3e4ec0f6ba6d31339727b2950c9772850d6545b7eae0b9d7c5", size = 4411646, upload-time = "2025-10-10T11:13:24.432Z" },
- { url = "https://files.pythonhosted.org/packages/5a/bd/a335ce6645334fb8d758cc358810defca14a1d19ffbc8a10bd38a2328565/psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:db4fd476874ccfdbb630a54426964959e58da4c61c9feba73e6094d51303d7d8", size = 4468701, upload-time = "2025-10-10T11:13:29.266Z" },
- { url = "https://files.pythonhosted.org/packages/44/d6/c8b4f53f34e295e45709b7568bf9b9407a612ea30387d35eb9fa84f269b4/psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:47f212c1d3be608a12937cc131bd85502954398aaa1320cb4c14421a0ffccf4c", size = 4166293, upload-time = "2025-10-10T11:13:33.336Z" },
- { url = "https://files.pythonhosted.org/packages/4b/e0/f8cc36eadd1b716ab36bb290618a3292e009867e5c97ce4aba908cb99644/psycopg2_binary-2.9.11-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e35b7abae2b0adab776add56111df1735ccc71406e56203515e228a8dc07089f", size = 3983184, upload-time = "2025-10-30T02:55:32.483Z" },
- { url = "https://files.pythonhosted.org/packages/53/3e/2a8fe18a4e61cfb3417da67b6318e12691772c0696d79434184a511906dc/psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fcf21be3ce5f5659daefd2b3b3b6e4727b028221ddc94e6c1523425579664747", size = 3652650, upload-time = "2025-10-10T11:13:38.181Z" },
- { url = "https://files.pythonhosted.org/packages/76/36/03801461b31b29fe58d228c24388f999fe814dfc302856e0d17f97d7c54d/psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:9bd81e64e8de111237737b29d68039b9c813bdf520156af36d26819c9a979e5f", size = 3298663, upload-time = "2025-10-10T11:13:44.878Z" },
- { url = "https://files.pythonhosted.org/packages/97/77/21b0ea2e1a73aa5fa9222b2a6b8ba325c43c3a8d54272839c991f2345656/psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:32770a4d666fbdafab017086655bcddab791d7cb260a16679cc5a7338b64343b", size = 3044737, upload-time = "2025-10-30T02:55:35.69Z" },
- { url = "https://files.pythonhosted.org/packages/67/69/f36abe5f118c1dca6d3726ceae164b9356985805480731ac6712a63f24f0/psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c3cb3a676873d7506825221045bd70e0427c905b9c8ee8d6acd70cfcbd6e576d", size = 3347643, upload-time = "2025-10-10T11:13:53.499Z" },
- { url = "https://files.pythonhosted.org/packages/e1/36/9c0c326fe3a4227953dfb29f5d0c8ae3b8eb8c1cd2967aa569f50cb3c61f/psycopg2_binary-2.9.11-cp314-cp314-win_amd64.whl", hash = "sha256:4012c9c954dfaccd28f94e84ab9f94e12df76b4afb22331b1f0d3154893a6316", size = 2803913, upload-time = "2025-10-10T11:13:57.058Z" },
-]
-
-[[package]]
-name = "requests"
-version = "2.32.5"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "certifi" },
- { name = "charset-normalizer" },
- { name = "idna" },
- { name = "urllib3" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf", size = 134517, upload-time = "2025-08-18T20:46:02.573Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" },
-]
-
-[[package]]
-name = "tzdata"
-version = "2025.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz", hash = "sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9", size = 196380, upload-time = "2025-03-23T13:54:43.652Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/5c/23/c7abc0ca0a1526a0774eca151daeb8de62ec457e77262b66b359c3c7679e/tzdata-2025.2-py2.py3-none-any.whl", hash = "sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8", size = 347839, upload-time = "2025-03-23T13:54:41.845Z" },
-]
-
-[[package]]
-name = "urllib3"
-version = "2.5.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760", size = 393185, upload-time = "2025-06-18T14:07:41.644Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc", size = 129795, upload-time = "2025-06-18T14:07:40.39Z" },
-]