Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-lister
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
Model registry
Operate
Environments
Monitor
Incidents
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
Platform
Development
swh-lister
Commits
c0dc8edb
Commit
c0dc8edb
authored
6 months ago
by
David Douard
Browse files
Options
Downloads
Patches
Plain Diff
Make qa tools happy again
parent
c6baacbc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!533
Apply swh-py-template v0.2.3
Pipeline
#10524
passed
6 months ago
Stage: external
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swh/lister/golang/lister.py
+5
-5
5 additions, 5 deletions
swh/lister/golang/lister.py
swh/lister/packagist/lister.py
+1
-1
1 addition, 1 deletion
swh/lister/packagist/lister.py
with
6 additions
and
6 deletions
swh/lister/golang/lister.py
+
5
−
5
View file @
c0dc8edb
...
...
@@ -73,9 +73,9 @@ class GolangLister(Lister[GolangStateType, GolangPageType]):
def
state_to_dict
(
self
,
state
:
GolangStateType
)
->
Dict
[
str
,
Any
]:
return
{
"
last_seen
"
:
state
.
last_seen
.
isoformat
()
if
state
.
last_seen
is
not
None
else
None
"
last_seen
"
:
(
state
.
last_seen
.
isoformat
()
if
state
.
last_seen
is
not
None
else
None
)
}
def
finalize
(
self
):
...
...
@@ -135,7 +135,7 @@ class GolangLister(Lister[GolangStateType, GolangPageType]):
# The index returns packages whose timestamp are greater or
# equal to the date provided as parameter, which will create
# an infinite loop if not stopped here.
return
[],
since
return
if
since
is
not
None
:
self
.
state
.
last_seen
=
since
...
...
@@ -143,7 +143,7 @@ class GolangLister(Lister[GolangStateType, GolangPageType]):
yield
page
page
,
since
=
self
.
get_single_page
(
since
=
since
)
if
since
==
self
.
state
.
last_seen
:
return
[],
since
return
if
since
is
not
None
:
self
.
state
.
last_seen
=
since
...
...
This diff is collapsed.
Click to expand it.
swh/lister/packagist/lister.py
+
1
−
1
View file @
c0dc8edb
...
...
@@ -47,7 +47,7 @@ class PackagistLister(Lister[PackagistListerState, PackagistPageType]):
For each package, its metadata are retrieved using Packagist API endpoints
whose responses are served from static files, which are guaranteed to be
efficient on the Packagist side (no dy
m
amic queries).
efficient on the Packagist side (no dy
n
amic queries).
Furthermore, subsequent listing will send the
"
If-Modified-Since
"
HTTP
header to only retrieve packages metadata updated since the previous listing
operation in order to save bandwidth and return only origins which might have
...
...
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