-
-
Notifications
You must be signed in to change notification settings - Fork 456
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Error:
2025-08-20 16:41:58.176397 : exception Couldn't use data file '/usr/local/services/xxxxxx/.coverage.cvm-api-0.112.XIvCOBix': no such table: context , Traceback (most recent call last)
I'm using uwsgi to start my service, and a thread is created to collect and report coverage data:
def _cover_report(_cover):
reporter = Reporter(_cover, "{token}", "{server}", "{project_name}", "{raw_name}", "{commit}", trim_path,"{user_agent}",{flags})
while True:
try:
wlog('whiletrue %s , %s ' % (os.getpid(), {interval}))
time.sleep({interval})
result = reporter.run()
_cover.erase()
wlog(result)
except Exception as e:
msg = traceback.format_exc()
wlog('exception %s , %s' % (e, msg))
time.sleep({interval})
qcov_origin_application = {entrance_func}
def {entrance_func}(environ=None, start_response=None):
cover.start()
res = qcov_origin_application(environ, start_response)
global report_thread_started
if not report_thread_started:
thread = threading.Thread(target=_cover_report, args=(cover,))
thread.setDaemon(True)
thread.start()
report_thread_started = True
return res
It seems that the erase() step causes the database file of other processes to be deleted.
My expectation is that each process collects its own data and then reports them to my server independently.
Please give me some guidance!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working