Detalhes do Job
← Voltar ao historico
ID
9873f9e4-422b-40de-9005-23adf3df2200
Status
Falhou
Criado em
25/05/2026 18:10:34
Finalizado em
25/05/2026 18:10:35
Progresso
0,0%
Etapa atual
Iniciando...
Mensagem de erro
You cannot call this from an async context - use a thread or sync_to_async.
Configuracao
{'chapter': 1, 'starting_point': 1, 'num_points': 4, 'starting_figure': 1, 'starting_table': 1, 'figure_template': '1', 'table_template': '1'}
Log Detalhado
[2026-05-25 21:10:34] [INFO] Job criado. session_key=97z5gbob21yvl2vv6qjrgp0hhjdprlqv
[2026-05-25 21:10:34] [INFO] Config: {'chapter': 1, 'starting_point': 1, 'num_points': 4, 'starting_figure': 1, 'starting_table': 1, 'figure_template': '1', 'table_template': '1'}
[2026-05-25 21:10:34] [INFO] Thread de geracao iniciada
[2026-05-25 21:10:34] [INFO] Output dir: /app/outputs/9873f9e4-422b-40de-9005-23adf3df2200
[2026-05-25 21:10:34] [INFO] Pontos a processar: [1, 2, 3, 4]
[2026-05-25 21:10:34] [INFO] Croquis encontrados: 15 arquivos em 14 pontos
[2026-05-25 21:10:34] [INFO] Planilhas encontradas: 14
[2026-05-25 21:10:35] [ERROR] ERRO FATAL: You cannot call this from an async context - use a thread or sync_to_async.
[2026-05-25 21:10:35] [ERROR] Traceback (most recent call last):
File "/app/reports/views.py", line 413, in _run_generation_background
job.save(update_fields=['current_step', 'progress'])
File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 874, in save
self.save_base(
File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 966, in save_base
updated = self._save_table(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 1110, in _save_table
results = self._do_update(
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 1213, in _do_update
return filtered._update(values, returning_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/query.py", line 1327, in _update
return query.get_compiler(self.db).execute_returning_sql(returning_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 2140, in execute_returning_sql
row_count = self.execute_sql(ROW_COUNT)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 2111, in execute_sql
row_count = super().execute_sql(result_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1622, in execute_sql
cursor = self.connection.cursor()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 24, in inner
raise SynchronousOnlyOperation(message)
django.core.exceptions.SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async.