Skip to content

Conversation

@valentijnscholten
Copy link
Member

@valentijnscholten valentijnscholten commented Mar 7, 2021

Currently our dojo_async_task decorator looks at the block_execution field in the users profile to determine if a task (deduplication, push to jira, send email, etc) should be performed synchronously, or asynchronously using celery.

There can be situation where this is the right default approach, for example when using the API. But sometimes in the UI you want direct feedback to see if that push to JIRA (or other task) was succesful.

I am going to use this in a future PR, but didn't want to sneak it in there. So here is the sync=True flag in its own PR.

example: jira_helper.push_to_jira(finding, sync=True) will ensure it's always performed synchronously in the current request/thread and the task won't get posted to celery.

@valentijnscholten valentijnscholten changed the base branch from master to dev March 7, 2021 10:19
@valentijnscholten valentijnscholten merged commit dcbc7f1 into DefectDojo:dev Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants