Utilities
Introduction
Some of the user’s actions in the platform are not reflected directly when running integrates locally, and are also not caught by our unit tests. Some examples of this are:
- Asynchronous tasks that use batch.
- Use external resources to send information to the user via email or message. This includes sending event report emails, downloading executive files, cloning a repository, etc.
To implement a new feature or for debugging purposes, it is important to know the result of such tasks before deploying to production.
Batch asynchronous tasks
There are known asynchronous tasks in the platform such as: cloning roots, doing rebase in a repository, downloading files, updating group or organization policies, etc. Taking as an example the case of updating the download of an executive report, we will follow the next steps to obtain the pdf file locally.
- Select the option to download the report from the platform in locathost:8001, and follow the steps to send a verification code.


- We can see the task is queued in the download center pending execution.


- Using the application of NoSQL Workbench
we find the pk id of the task we just queued with the related action
report
.


- Finally we run the terminal command, afterwards we will see the report available in the local platform.
m . /integrates/batch hacker "task_id"
Mailing templates
To check the html result when sending email reports you can:
- Adjust the file
integrates/back/integrates/mailer/common.py
to print the content and allow to process test groups. - Run the following command to get the output file in VSCode.
m . /integrates/back dev > output.txt