Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
network
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
9
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
network
Commits
6ce6ac30
Verified
Commit
6ce6ac30
authored
2 years ago
by
Georg Krause
Browse files
Options
Downloads
Patches
Plain Diff
fix: Remove outdated code
parent
00f84797
No related branches found
Branches containing commit
No related tags found
1 merge request
!43
Apply patches from the server
Pipeline
#26092
failed with stage
in 2 minutes and 4 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
funkwhale_network/routes.py
+0
-1
0 additions, 1 deletion
funkwhale_network/routes.py
funkwhale_network/server.py
+0
-1
0 additions, 1 deletion
funkwhale_network/server.py
funkwhale_network/worker.py
+0
-24
0 additions, 24 deletions
funkwhale_network/worker.py
with
0 additions
and
26 deletions
funkwhale_network/routes.py
+
0
−
1
View file @
6ce6ac30
...
...
@@ -94,7 +94,6 @@ async def domains(request):
)
domain
=
await
serializers
.
create_domain
(
request
[
"
conn
"
],
payload
)
await
request
.
app
[
"
crawler
"
].
poll
(
payload
[
"
name
"
])
if
domain
:
payload
=
serializers
.
serialize_domain
(
domain
)
return
web
.
json_response
(
payload
,
status
=
201
)
...
...
This diff is collapsed.
Click to expand it.
funkwhale_network/server.py
+
0
−
1
View file @
6ce6ac30
...
...
@@ -11,7 +11,6 @@ def prepare_app(app, pool):
app
.
router
.
add_get
(
"
/api/domains/stats
"
,
routes
.
stats
)
app
.
add_routes
([
web
.
static
(
"
/static
"
,
routes
.
STATIC_DIR
)])
app
[
"
pool
"
]
=
pool
app
[
"
crawler
"
]
=
worker
.
Crawler
()
async
def
on_shutdown
(
app
):
...
...
This diff is collapsed.
Click to expand it.
funkwhale_network/worker.py
+
0
−
24
View file @
6ce6ac30
...
...
@@ -8,30 +8,6 @@ from aiohttp import ClientSession
from
arq
import
cron
#class Crawler(arq.Actor):
class
Crawler
():
async
def
startup
(
self
):
kwargs
=
crawler
.
get_session_kwargs
()
self
.
session
=
aiohttp
.
ClientSession
()
#loop=self.loop, **kwargs)
self
.
pool
=
await
db
.
get_pool
(
settings
.
DB_DSN
)
#@arq.concurrent
async
def
poll
(
self
,
domain
):
async
with
self
.
pool
.
acquire
()
as
conn
:
return
await
crawler
.
check
(
conn
=
conn
,
session
=
self
.
session
,
domain
=
domain
)
#@arq.cron(minute=0, hour={0, 6, 12, 18})
async
def
poll_all
(
self
):
async
with
self
.
pool
.
acquire
()
as
conn
:
for
check
in
await
db
.
get_latest_check_by_domain
(
conn
):
await
self
.
poll
(
check
[
"
domain
"
])
async
def
shutdown
(
self
):
await
self
.
session
.
close
()
self
.
pool
.
close
()
await
self
.
pool
.
wait_closed
()
async
def
poll
(
ctx
,
domain
):
session
:
ClientSession
=
ctx
[
'
session
'
]
pool
=
await
db
.
get_pool
(
settings
.
DB_DSN
)
...
...
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