feat: use custom type to handle existing naive datetimes
This commit is contained in:
parent
e22abb383c
commit
39bdac1ecf
45 changed files with 210 additions and 84 deletions
|
@ -1,9 +1,9 @@
|
|||
import datetime
|
||||
import os.path
|
||||
import sys
|
||||
from abc import abstractmethod
|
||||
import datetime
|
||||
from collections import defaultdict
|
||||
from typing import Optional, Any, List, Dict
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from flask import current_app
|
||||
from sqlalchemy import text
|
||||
|
@ -11,7 +11,7 @@ from sqlalchemy import text
|
|||
from app import app
|
||||
from app.extensions import db
|
||||
from app.models.base import Group
|
||||
from app.models.mirrors import Proxy, Origin, SmartProxy
|
||||
from app.models.mirrors import Origin, Proxy, SmartProxy
|
||||
from app.terraform.terraform import TerraformAutomation
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Optional, Any
|
||||
from typing import Any, Optional
|
||||
|
||||
from app.extensions import db
|
||||
from app.models.mirrors import Proxy
|
||||
|
|
|
@ -235,6 +235,7 @@ class ProxyMetaAutomation(BaseAutomation):
|
|||
"""
|
||||
pools = Pool.query.all()
|
||||
for pool in pools:
|
||||
logging.debug(pool.added < datetime.now(tz=timezone.utc))
|
||||
if pool.id == -1:
|
||||
continue # Skip hotspare pool
|
||||
logging.debug("Missing proxy check for %s", pool.pool_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue