File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -835,10 +835,15 @@ def log_template_exists():
835835 session .add (
836836 LogTemplate (
837837 filename = "{{ ti.dag_id }}/{{ ti.task_id }}/{{ ts }}/{{ try_number }}.log" ,
838- elasticsearch_id = "{dag_id}- {task_id}- {execution_date}- {try_number}" ,
838+ elasticsearch_id = "{dag_id}_ {task_id}_ {execution_date}_ {try_number}" ,
839839 )
840840 )
841841 session .flush ()
842+ wrong_log_id = "{dag_id}-{task_id}-{execution_date}-{try_number}"
843+ correct_log_id = "{dag_id}_{task_id}_{execution_date}_{try_number}"
844+ session .query (LogTemplate ).filter (LogTemplate .elasticsearch_id == wrong_log_id ).update (
845+ {LogTemplate .elasticsearch_id : correct_log_id }, synchronize_session = 'fetch'
846+ )
842847
843848 # Before checking if the _current_ value exists, we need to check if the old config value we upgraded in
844849 # place exists!
You can’t perform that action at this time.
0 commit comments