File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
import argparse
2
2
import logging
3
3
import os
4
+ import random
4
5
from shutil import which
5
6
import time
6
7
@@ -200,8 +201,8 @@ def generate_run_id() -> int:
200
201
int: Unique identifier for the run
201
202
202
203
"""
203
- logger .debug ("Generating run_id from timestamp" )
204
- run_id = int (time .time ())
204
+ logger .debug ("Generating run_id from timestamp and random number " )
205
+ run_id = int (time .time ()) * 1000 + random . randint ( 0 , 1000 )
205
206
config .RUN ["run_id" ] = run_id
206
207
return run_id
207
208
Original file line number Diff line number Diff line change 1
1
import argparse
2
2
import faulthandler
3
3
import os
4
+ import random
4
5
import re
5
6
import signal
6
7
import sys
@@ -209,7 +210,7 @@ def process_ocsci_conf(arguments):
209
210
if args .flexy_env_file :
210
211
framework .config .ENV_DATA ["flexy_env_file" ] = args .flexy_env_file
211
212
212
- framework .config .RUN ["run_id" ] = int (time .time ())
213
+ framework .config .RUN ["run_id" ] = int (time .time ()) * 1000 + random . randint ( 0 , 1000 )
213
214
bin_dir = framework .config .RUN .get ("bin_dir" )
214
215
if bin_dir :
215
216
framework .config .RUN ["bin_dir" ] = os .path .abspath (
You can’t perform that action at this time.
0 commit comments