Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No healthcheck endpoint #103

Open
robinicole opened this issue Mar 5, 2020 · 2 comments
Open

No healthcheck endpoint #103

robinicole opened this issue Mar 5, 2020 · 2 comments
Labels
enhancement help wanted this is easy to fix issue that is usually beginner friendly

Comments

@robinicole
Copy link

I need an healthcheck endpoint to deploy my scrapyrt on ecs but couldn't find any.

@robinicole
Copy link
Author

robinicole commented Mar 5, 2020

Adding a healthceck ressource :

class HealthCheck(ServiceResource):

    isLeaf = True
    allowedMethods = ['GET']

    def render_GET(self, *args, **kwargs):
        return {'status': 'ok'}

would certainly solve the issue

@pawelmhm pawelmhm added enhancement help wanted this is easy to fix issue that is usually beginner friendly labels Jan 29, 2021
@pawelmhm
Copy link
Member

This is a matter of adding your code sample here in resources https://github.com/scrapinghub/scrapyrt/blob/master/scrapyrt/resources.py and then adding it in config https://github.com/scrapinghub/scrapyrt/blob/master/scrapyrt/conf/default_settings.py#L23

To check health it would be good to perform some command, e.g. scrapy list, to be sure project is healthy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted this is easy to fix issue that is usually beginner friendly
Projects
None yet
Development

No branches or pull requests

2 participants