Skip to content

Instantly share code, notes, and snippets.

@seanh
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanh/bb3af3e99cd18d270256 to your computer and use it in GitHub Desktop.
Save seanh/bb3af3e99cd18d270256 to your computer and use it in GitHub Desktop.
ckanext-deadoralive demo
Link checker                                                     Client site
                 <----------------- Please check these links: -
                                         [<id_1>, <id_2> ...]
                 - 200 OK ------------------------------------>

                 - What's the URL for resource <id_1>? ------->
                 <---- The URL for resource <id_1> is <url_1> -  (Gets URL from db)
(Checks <url_1>) - Resource <id_1>'s URL is broken ----------->  (Saves result)

                 - What's the URL for resource <id_2>? ------->
                 <---- The URL for resource <id_2> is <url_2> -  (Gets URL from db)
(Checks <url_2>) - Resource <id_2>'s URL is broken ----------->  (Saves result)
                                ...
pip install ckanext-deadoralive
Add deadoralive to ckan.plugins in config file
Create a user for the link checker
Add ckanext.deadoralive.authorized_users to config file
Restart CKAN
pip install deadoralive
deadoralive --url ... --apikey ...
Add cron job
Link checker service                                            Client site
deadoralive                                                     ckanext-deadoralive
                - Give me up to 50 resources to check ------->
                <-------------------- [<id_1>, <id_2>, ... ] -  (Gets resource IDs from db)

                - What's the URL for resource <id_1>? ------->
                <---- The URL for resource <id_1> is <url_1> -  (Gets URL from db)
(Checks <url_1>) - Resource <id_1>'s URL is broken ----------->  (Saves result)

                - What's the URL for resource <id_2>? ------->
                <---- The URL for resource <id_2> is <url_2> -  (Gets URL from db)
(Checks <url_2>) - Resource <id_2>'s URL is working --------->  (Saves result)

                ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment