mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Send crash report synchronous to avoid lost of events
This commit is contained in:
parent
6208cb997d
commit
16dc0d1a8a
@ -18,6 +18,7 @@
|
||||
import raven
|
||||
import json
|
||||
import asyncio.futures
|
||||
import asyncio
|
||||
|
||||
from .version import __version__
|
||||
from .config import Config
|
||||
@ -32,7 +33,7 @@ class CrashReport:
|
||||
Report crash to a third party service
|
||||
"""
|
||||
|
||||
DSN = "aiohttp+https://50af75d8641d4ea7a4ea6b38c7df6cf9:41d54936f8f14e558066262e2ec8bbeb@app.getsentry.com/38482"
|
||||
DSN = "sync+https://50af75d8641d4ea7a4ea6b38c7df6cf9:41d54936f8f14e558066262e2ec8bbeb@app.getsentry.com/38482"
|
||||
_instance = None
|
||||
|
||||
def __init__(self):
|
||||
@ -49,10 +50,7 @@ class CrashReport:
|
||||
"url": request.path,
|
||||
"data": request.json,
|
||||
})
|
||||
try:
|
||||
self._client.captureException()
|
||||
except asyncio.futures.TimeoutError:
|
||||
pass # We don't care if we can send the bug report
|
||||
self._client.captureException()
|
||||
|
||||
@classmethod
|
||||
def instance(cls):
|
||||
|
@ -130,7 +130,7 @@ class Server:
|
||||
if modified > self._start_time:
|
||||
log.debug("File {} has been modified".format(path))
|
||||
asyncio.async(reload())
|
||||
self._loop.call_later(1, self._reload_hook)
|
||||
self._loop.call_later(1, self._reload_hook, handler)
|
||||
|
||||
def _create_ssl_context(self, server_config):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user