Closed ChandlerSwift closed 4 years ago
Currently this has problems because when we try to assign start_time
, it doesn't seem to be properly cast.
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.DatatypeMismatch) column "start_time" is of type timestamp without time zone but expression is of type numeric
LINE 3: ...NULL, true, '', NULL, true, NULL, true, 0, false, 1593375265...
Adding a single field is not possible:
class Result(Base):
__table__ = Table('result', Base.metadata,
autoload=True, autoload_with=engine)
start_time = Column(DateTime) # If this is autoloaded, Python doesn't cast correctly.
sqlalchemy.exc.ArgumentError: Can't add additional column 'start_time' when specifying __table__
In the worker,
result.py
consists of a lot of redefinitions fromweb/web/models/result.py
, which could be replaced with something like