Changeset View
Changeset View
Standalone View
Standalone View
swh/search/journal_client.py
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | search.origin_update( | |||||||||
] | ] | |||||||||
) | ) | |||||||||
def process_origin_visit_statuses(visit_statuses, search): | def process_origin_visit_statuses(visit_statuses, search): | |||||||||
logging.debug("processing origin visit statuses %r", visit_statuses) | logging.debug("processing origin visit statuses %r", visit_statuses) | |||||||||
full_visit_status = [ | full_visit_status = [ | |||||||||
{"url": (visit_status["origin"]), "has_visits": True,} | { | |||||||||
ardumontUnsubmitted Not Done Inline Actions
ardumont: | ||||||||||
"url": (visit_status["origin"]), | ||||||||||
"has_visits": True, | ||||||||||
"nb_visits": visit_status["visit"], | ||||||||||
Not Done Inline Actions
As the date is a required datetime field, this will give an iso8601 string. ardumont: As the date is a required datetime field, this will give an iso8601 string. | ||||||||||
"last_visit_date": visit_status["date"].isoformat(), | ||||||||||
} | ||||||||||
for visit_status in visit_statuses | for visit_status in visit_statuses | |||||||||
if visit_status["status"] == "full" | if visit_status["status"] == "full" | |||||||||
] | ] | |||||||||
if full_visit_status: | if full_visit_status: | |||||||||
search.origin_update(full_visit_status) | search.origin_update(full_visit_status) | |||||||||
Show All 9 Lines |