mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
set actual counter/start/end values in the event generation script
This commit is contained in:
parent
4a455c7bf7
commit
92cc597e84
@ -162,6 +162,19 @@ if __name__ == '__main__':
|
||||
w.join()
|
||||
|
||||
workers = []
|
||||
|
||||
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;')
|
||||
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"
|
||||
)
|
||||
conn.commit()
|
||||
finally:
|
||||
# restore all indexes
|
||||
print(datetime.datetime.utcnow().isoformat())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user