mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
Merge pull request #5978 from ryanpetrello/firehose-start-end-fix
fix start/end line incrementing behavior Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
d271a8c9fa
@ -209,14 +209,17 @@ def generate_events(events, job):
|
||||
|
||||
print('generating unique start/end line counts')
|
||||
cursor.execute('CREATE SEQUENCE IF NOT EXISTS firehose_seq;')
|
||||
cursor.execute('CREATE SEQUENCE IF NOT EXISTS firehose_line_seq;')
|
||||
cursor.execute('CREATE SEQUENCE IF NOT EXISTS firehose_line_seq MINVALUE 0;')
|
||||
cursor.execute('ALTER SEQUENCE firehose_seq RESTART WITH 1;')
|
||||
cursor.execute('ALTER SEQUENCE firehose_line_seq RESTART WITH 0;')
|
||||
cursor.execute("SELECT nextval('firehose_line_seq')")
|
||||
conn.commit()
|
||||
|
||||
cursor.execute(
|
||||
"UPDATE main_jobevent SET "
|
||||
"counter=nextval('firehose_seq')::integer,"
|
||||
"start_line=nextval('firehose_seq')::integer,"
|
||||
"end_line=currval('firehose_seq')::integer + 2"
|
||||
"start_line=nextval('firehose_line_seq')::integer,"
|
||||
"end_line=currval('firehose_line_seq')::integer + 2"
|
||||
)
|
||||
conn.commit()
|
||||
finally:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user