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

What can make an API call [Discussion] #400

Closed
sssoleileraaa opened this issue Jun 4, 2019 · 2 comments
Closed

What can make an API call [Discussion] #400

sssoleileraaa opened this issue Jun 4, 2019 · 2 comments

Comments

@sssoleileraaa
Copy link
Contributor

Description

I want to open a discussion issue around where we make api calls from in the client.

We reference the SDK API from many places:

securedrop_client/logic.py:
securedrop_client/message_sync.py:
securedrop_client/queue.py
securedrop_client/storage.py
securedrop_client/api_jobs/base.py
securedrop_client/api_jobs/downloads.py

After we move reply and message sync logic to api jobs, we should consider creating the sdclientapi.API instance in RunnableQueue to help separate concerns. If a user logs out, the queue can pause and make sure no api calls are made.

@sssoleileraaa sssoleileraaa changed the title Create instance of sdclientapi.API in Queue [Discussion] What can make an API call [Discussion] Jun 4, 2019
@redshiftzero
Copy link
Contributor

redshiftzero commented Jun 4, 2019

having one place that mediates network calls / auth state is a good idea... though we do the sync from logic.py. we could add a third queue that only does login, logout, and syncing of metadata and move the sync logic from logic.py to queue.py, then the queue could be that place

@eloquence
Copy link
Member

This is an old discussion-only issue from 2019 that hasn't received traction since then, so closing for now.

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

No branches or pull requests

3 participants