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

[Feature] Rewrite Webhooks #15

Closed
3 tasks
techman83 opened this issue Sep 13, 2019 · 4 comments · Fixed by #48
Closed
3 tasks

[Feature] Rewrite Webhooks #15

techman83 opened this issue Sep 13, 2019 · 4 comments · Fixed by #48

Comments

@techman83
Copy link
Member

To get us across the line the existing webhooks have been used. We should switch this out for something like flask.

To Do

  • Handle GitHub Webhooks
  • Handle Spacedock Webhooks
  • Handle Internet Archive Mirroring

We can probably sort #14 first and look at how we do this. We can likely have a TaskDefinition and a Webhooks Inbound queue or use a temporary Queue (Queues are free, traffic to them isn't, so I don't know the benefit for temporary for this use case, except it's faster and we don't care about having a few extra queues sitting idle). We can also use an archive queue and write a specific task definition for handling those tasks.

@HebaruSan

This comment has been minimized.

@techman83
Copy link
Member Author

Raised in #16 😬 - sorry @HebaruSan totally forgot it was a thing!

@HebaruSan
Copy link
Member

Might as well attempt #8 if we have to rewrite it all anyway.

@techman83
Copy link
Member Author

Even with a brute force full scan of the NetKAN repo, it takes < 100ms to pull out the identifiers. So I reckon we could do this without much hassle.

In [18]: from pathlib import Path 
    ...: import json 
    ...: def test(): 
    ...:     identifiers = [] 
    ...:     for netkan in Path('.').glob('*.netkan'): 
    ...:         identifiers.append(json.loads(netkan.read_text())['identifier']) 
    ...: print(timeit.timeit('test()', globals=globals(), number=100)/100)                                                                                                                                                                                                                                                   
0.08117726542055607

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants