Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cli
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
funkwhale
cli
Commits
3f2513ec
Verified
Commit
3f2513ec
authored
6 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Faster CLI startup time by moving aiohttp import to runtime"
This reverts commit
fe55ed80
.
parent
fe55ed80
No related branches found
No related tags found
No related merge requests found
Pipeline
#4595
passed
6 years ago
Stage: test
Stage: build
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
funkwhale_cli/api.py
+2
-4
2 additions, 4 deletions
funkwhale_cli/api.py
funkwhale_cli/cli/base.py
+1
-1
1 addition, 1 deletion
funkwhale_cli/cli/base.py
funkwhale_cli/cli/tracks.py
+1
-2
1 addition, 2 deletions
funkwhale_cli/cli/tracks.py
with
4 additions
and
7 deletions
funkwhale_cli/api.py
+
2
−
4
View file @
3f2513ec
import
aiohttp
from
.
import
exceptions
from
.
import
schemas
from
.
import
settings
def
get_session_kwargs
():
import
aiohttp
headers
=
{
"
User-Agent
"
:
settings
.
USER_AGENT
}
return
{
"
timeout
"
:
aiohttp
.
ClientTimeout
(
total
=
settings
.
TIMEOUT
),
...
...
@@ -14,8 +14,6 @@ def get_session_kwargs():
def
get_session
():
import
aiohttp
kwargs
=
get_session_kwargs
()
return
aiohttp
.
ClientSession
(
**
kwargs
)
...
...
This diff is collapsed.
Click to expand it.
funkwhale_cli/cli/base.py
+
1
−
1
View file @
3f2513ec
import
asyncio
import
aiohttp
import
click
import
click_log
import
dotenv
...
...
@@ -109,7 +110,6 @@ def env_file(v):
def
async_command
(
f
):
def
wrapper
(
*
args
,
**
kwargs
):
import
aiohttp
loop
=
asyncio
.
get_event_loop
()
ignore_aiohttp_ssl_eror
(
loop
)
_async_reraise
=
kwargs
.
pop
(
"
_async_reraise
"
,
False
)
...
...
This diff is collapsed.
Click to expand it.
funkwhale_cli/cli/tracks.py
+
1
−
2
View file @
3f2513ec
import
os
import
pathlib
import
aiohttp
import
click
import
tqdm
...
...
@@ -69,8 +70,6 @@ async def get_track_download_url(id, remote, format=None):
async
def
track_download
(
ctx
,
id
,
format
,
directory
,
template
,
overwrite
,
ignore_errors
,
skip_existing
):
import
aiohttp
async
with
ctx
.
obj
[
"
remote
"
]:
progressbar
=
tqdm
.
tqdm
(
id
,
unit
=
"
Files
"
)
for
i
in
progressbar
:
...
...
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