Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
82f81c62
Commit
82f81c62
authored
5 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Apply monkey patch to all modules supported by eventlet.
parent
b580f9cb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opaque.py
+5
-12
5 additions, 12 deletions
opaque.py
with
5 additions
and
12 deletions
opaque.py
+
5
−
12
View file @
82f81c62
import
eventlet
import
eventlet
eventlet
.
monkey_patch
(
os
=
True
,
eventlet
.
monkey_patch
()
select
=
True
,
socket
=
True
,
thread
=
False
,
time
=
True
,
psycopg
=
True
)
from
dotenv
import
load_dotenv
from
dotenv
import
load_dotenv
load_dotenv
()
load_dotenv
()
from
app
import
create_app
,
db
,
socketio
from
app
import
create_app
,
db
,
socketio
from
app.models
import
Corpus
,
User
,
Role
,
Permission
,
Job
from
app.models
import
Corpus
,
User
,
Role
,
Permission
,
Job
from
flask_migrate
import
Migrate
from
flask_migrate
import
Migrate
...
@@ -19,10 +12,6 @@ app = create_app(os.getenv('FLASK_CONFIG') or 'default')
...
@@ -19,10 +12,6 @@ app = create_app(os.getenv('FLASK_CONFIG') or 'default')
migrate
=
Migrate
(
app
,
db
)
migrate
=
Migrate
(
app
,
db
)
if
__name__
==
'
__main__
'
:
socketio
.
run
(
app
)
@app.shell_context_processor
@app.shell_context_processor
def
make_shell_context
():
def
make_shell_context
():
return
dict
(
db
=
db
,
return
dict
(
db
=
db
,
...
@@ -39,3 +28,7 @@ def test():
...
@@ -39,3 +28,7 @@ def test():
import
unittest
import
unittest
tests
=
unittest
.
TestLoader
().
discover
(
'
tests
'
)
tests
=
unittest
.
TestLoader
().
discover
(
'
tests
'
)
unittest
.
TextTestRunner
(
verbosity
=
2
).
run
(
tests
)
unittest
.
TextTestRunner
(
verbosity
=
2
).
run
(
tests
)
if
__name__
==
'
__main__
'
:
socketio
.
run
(
app
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment