euscanwww: added scan_package task
Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
parent
779ccdf5d3
commit
f9c9a4bfd8
@ -234,6 +234,13 @@ def update_task(update_portage_trees=True, scan_portage=True,
|
|||||||
update_counters(fast=False)
|
update_counters(fast=False)
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def scan_package_task(package):
|
||||||
|
_scan_portage_task([package], purge_packages=True, purge_versions=True)
|
||||||
|
_scan_metadata_task([package])
|
||||||
|
_scan_upstream_task([package])
|
||||||
|
|
||||||
|
|
||||||
@periodic_task(run_every=crontab(minute="*/1"))
|
@periodic_task(run_every=crontab(minute="*/1"))
|
||||||
def consume_refresh_package_request():
|
def consume_refresh_package_request():
|
||||||
"""
|
"""
|
||||||
@ -244,7 +251,7 @@ def consume_refresh_package_request():
|
|||||||
except RefreshPackageQuery.DoesNotExist:
|
except RefreshPackageQuery.DoesNotExist:
|
||||||
return {}
|
return {}
|
||||||
else:
|
else:
|
||||||
result = _scan_upstream_task([obj.query])
|
result = scan_package_task(obj.query)
|
||||||
obj.delete()
|
obj.delete()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@ -267,5 +274,6 @@ admin_tasks = [
|
|||||||
scan_upstream_all_task,
|
scan_upstream_all_task,
|
||||||
scan_upstream_list_task,
|
scan_upstream_list_task,
|
||||||
update_portage_trees,
|
update_portage_trees,
|
||||||
update_task
|
update_task,
|
||||||
|
scan_package_task,
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user