Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
df-aggregator
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oleksandr Barabash
df-aggregator
Commits
33f28665
Commit
33f28665
authored
Aug 07, 2023
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_ProactorBasePipeTransport updated
parent
e664f34a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
app.py
app.py
+21
-0
No files found.
app.py
View file @
33f28665
...
@@ -6,6 +6,7 @@ import os
...
@@ -6,6 +6,7 @@ import os
import
signal
import
signal
import
sys
import
sys
from
asyncio
import
AbstractEventLoop
from
asyncio
import
AbstractEventLoop
from
functools
import
wraps
from
threading
import
Thread
from
threading
import
Thread
from
typing
import
Any
,
Optional
from
typing
import
Any
,
Optional
...
@@ -25,6 +26,26 @@ flags.DEFINE_list('station_ids', [], 'Station IDs')
...
@@ -25,6 +26,26 @@ flags.DEFINE_list('station_ids', [], 'Station IDs')
flags
.
DEFINE_string
(
'file'
,
None
,
"File where to save the history"
)
flags
.
DEFINE_string
(
'file'
,
None
,
"File where to save the history"
)
def
silence_event_loop_closed
(
func
):
""" prevent error when closing on windows """
@wraps
(
func
)
def
wrapper
(
self
,
*
args
,
**
kwargs
):
""" wrapper """
try
:
return
func
(
self
,
*
args
,
**
kwargs
)
except
RuntimeError
as
e
:
if
str
(
e
)
!=
'Event loop is closed'
:
raise
return
wrapper
if
sys
.
platform
==
"win32"
:
from
asyncio.proactor_events
import
_ProactorBasePipeTransport
_ProactorBasePipeTransport
.
__del__
=
silence_event_loop_closed
(
_ProactorBasePipeTransport
.
__del__
)
class
PacketLogger
(
abc
.
ABC
):
class
PacketLogger
(
abc
.
ABC
):
""" Abstract Logger """
""" Abstract Logger """
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment