@@ -29,7 +29,7 @@ from app.tasks.forumtasks import import_topic_list, check_all_forum_accounts
|
||||
from app.tasks.importtasks import import_repo_screenshot, check_zip_release, check_for_updates, update_all_game_support, \
|
||||
import_languages
|
||||
from app.tasks.usertasks import import_github_user_ids
|
||||
from app.tasks.pkgtasks import notify_about_git_forum_links, clear_removed_packages
|
||||
from app.tasks.pkgtasks import notify_about_git_forum_links, clear_removed_packages, check_package_for_broken_links
|
||||
from app.utils import add_notification, get_system_user
|
||||
|
||||
actions = {}
|
||||
@@ -404,3 +404,9 @@ def delete_empty_threads():
|
||||
flash(f"Deleted {count} threads", "success")
|
||||
|
||||
return redirect(url_for("admin.admin_page"))
|
||||
|
||||
|
||||
@action("DANGER: Check for broken links in all packages")
|
||||
def check_for_broken_links():
|
||||
for package in Package.query.filter_by(state=PackageState.APPROVED).order_by(db.desc(Package.score)).limit(100).all():
|
||||
check_package_for_broken_links.delay(package.id)
|
||||
|
||||
Reference in New Issue
Block a user