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

Move debug check from doWork #122

Open
nya-elimu opened this issue Apr 19, 2022 · 0 comments
Open

Move debug check from doWork #122

nya-elimu opened this issue Apr 19, 2022 · 0 comments

Comments

@nya-elimu
Copy link
Member

nya-elimu commented Apr 19, 2022

In UploadEventsWorker, the code only gets executed if the current build type is not "debug":

if (!"debug".equals(BuildConfig.BUILD_TYPE)) {
    uploadLetterLearningEvents();
    uploadLetterAssessmentEvents();
    uploadWordLearningEvents();
    uploadWordAssessmentEvents();
    uploadStoryBookLearningEvents();
}

A better solution would be to execute as much code as possible, and skipping execution at the point where the files are about to get uploaded to the server. This way, a larger part of the code gets executed (and tested) during development, also making debugging easier.

@nya-elimu nya-elimu changed the title Move if debug check from doWork Move debug check from doWork Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant