Scifabric / pybossa

PYBOSSA is the ultimate crowdsourcing framework (aka microtasking) to analyze or enrich data that can't be processed by machines alone.
http://pybossa.com
GNU Affero General Public License v3.0
743 stars 265 forks source link

Queues failing #1972

Closed dvhassel closed 4 years ago

dvhassel commented 4 years ago

Hello,

Some tasks seem to fail in RQ

The error I get is (truncated):

sqlalchemy.exc.DataError: (psycopg2.errors.InvalidDatetimeFormat) invalid value "\x32" for "YYYY" DETAIL: Value must be an integer.

[SQL: SELECT AVG(to_timestamp(finish_time, 'YYYY-MM-DD-THH24-MI-SS.US') - to_timestamp(created, 'YYYY-MM-DD-THH24-MI-SS.US')) AS average_time FROM task_run WHERE project_id=%(project_id)s;] [parameters: {'project_id': 4}]

The values of task_run.created in the database are

\\x323032302d30332d31355431343a35333a33322e303334363532 \\x323032302d30332d31355431343a35393a30302e383535323435

the values of task_run.finish_time are fine:

2020-03-15T15:02:55.661070 2020-03-15T15:03:01.483413

The export of task runs also doesn't seem to get updated, I suspect this is related to the above error?

teleyinex commented 4 years ago

Yes, this is identified and it should be fixed by this #1973

teleyinex commented 4 years ago

Please re-open if you find the bug again, but this is now fixed in master. You can use the cli.py to fix the current dates in your DB. Check it out.