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

Async [un]subscribes #24

Merged
merged 8 commits into from
Feb 20, 2020
Merged

Async [un]subscribes #24

merged 8 commits into from
Feb 20, 2020

Conversation

stefankoegl
Copy link
Member

Subscribe to / unsubscribe from podcasts in Celery tasks.

A full sync is only necessary after a device is added to a sync group.

Each subscribe / unsubscribe is propagated to the whole sync group by the
subscribe() / unsubscribe() methods directly, without the use of signals
@stefankoegl
Copy link
Member Author

Subscription API tests currently fail because there is no worker that processes the tasks. A celery worker might need to be run for processing tasks (see RentMethod/django-celery-testworker and RentMethod/django-celery-testworker#4).

@stefankoegl
Copy link
Member Author

Fixed by keeping API actions synchronous, and making only subscriptions triggered via web async.

@stefankoegl
Copy link
Member Author

TODO: make the device (subscriptions? podcast?) UI reload until all pending subscriptions are complete.

@stefankoegl stefankoegl changed the title Async [un]subscribes Async [un]subscribes [WIP] Jan 30, 2020
@SiqingYu SiqingYu added the api label Feb 16, 2020
@SiqingYu SiqingYu self-requested a review February 16, 2020 09:33
@SiqingYu SiqingYu merged commit b93169c into master Feb 20, 2020
@SiqingYu SiqingYu deleted the subscribe-task branch February 20, 2020 13:30
@SiqingYu
Copy link
Contributor

SiqingYu commented Feb 20, 2020

Travis CI pytest passed. Merged into master. We could add functionality on front-end in the future.

@SiqingYu SiqingYu changed the title Async [un]subscribes [WIP] Async [un]subscribes Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants