Last_run in list_resources view is effectively the first run
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia in views.py, nella funzione list_resources, e verifica come first_run, last_run e gli altri valori raccolti vengono utilizzati nella risposta. Correggi il confronto dell'ultima esecuzione e determina quali valori inutilizzati possono essere rimossi; il lavoro è completato quando l'elenco delle risorse segnala l'ultima esecuzione corretta senza compromettere la risposta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When trying to come up with a fix for issue #326, I noticed some code in which all kinds of info about resources is gathered in a loop. In this code the first and last runs of all (filtered) resources is determined as well. However, I've noticed that the comparison operator is "less than" in both cased.
See the following code in views.py, function list_resources:
for resource in response['resources']:
if resource.run_count > 0:
# View should work even without Runs
if first_run is None or resource.first_run < first_run:
first_run = resource.first_run
if last_run is None or resource.last_run < last_run:
last_run = resource.last_run
response['first_run'] = first_run
I've also noticed that, although first_run and last_run are stored in the response object, they don't appear to be used anywhere. This might also be the case for other variables collected in list_resources and other functions. Cleaning this up should also improve the performance, as reported in issue #326.
- Lingua principale
- Python
- Stelle
- 92
- Fork
- 76
- Merge medio
- 7h 21m
- PR unite (30g)
- 3
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di geopython/GeoHealthCheck
-
Data importApertaquestion
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
geopython/GeoHealthCheck#522 · 1 commento ·
-
FTP ProbeApertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
geopython/GeoHealthCheck#520 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
geopython/GeoHealthCheck#517 ·
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
geopython/GeoHealthCheck#483 · 1 commento ·
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
geopython/GeoHealthCheck#472 ·
Tutte le issue di geopython/GeoHealthCheck
Issue simili
-
Broken links found in docsApertadocs pydanty:is-working
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pydantic/pydantic-ai#10113 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
GreedyBear-Project/GreedyBear#1727 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ARM-software/CMSIS-DSP#354 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
kiat/codeAssist#391 ·
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
darnitdevorg/darnit#587 ·
I maintainer di solito rispondono entro 1 giorno