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

[5044] apps/votes: add token generation component to dashboard, use async tasks #4468

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

fuzzylogic2000
Copy link
Contributor

This is the generation in an extra dashboard component. It puts the bulk_create in tasks split up in chunks of 100,000. So, to test remember to start the background tasks.

Copy link
Contributor

@khamui khamui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty decent! working fine.
Ofc leaving for @Rineee to check and merge.


<p class="form-hint">{% blocktranslate %}For voting in the third phase, participants need a voting code. You can generate and download the codes here. {% endblocktranslate %}</p>
<p>{% blocktranslate count counter=number_of_module_tokens %}
One code has been generated for this module so far.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity. with adding the voting module it will generate one code per se?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, you are right, we should use the number here as well as in other languages the 0 might have an extra form. In English and German the plural is used, so it should be fine. I will check to be sure, though!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it does work with the 0 in English and it will also be fine in German with the translation

Copy link
Contributor

@Rineee Rineee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah cool, it is sooooo much faster now!

I checked what happens when the unique constraint is violated, then the whole background task fails and no code is generated... but should we merge and handle that later then @fuzzylogic2000 ?

@fuzzylogic2000
Copy link
Contributor Author

Yeah cool, it is sooooo much faster now!

I checked what happens when the unique constraint is violated, then the whole background task fails and no code is generated... but should we merge and handle that later then @fuzzylogic2000 ?

@Rineee Yes, let's merge and I will add a task to handle that. Would be good to do with tests anyway. :)

@Rineee Rineee merged commit 089329f into main Sep 13, 2022
@Rineee Rineee deleted the kl-2022-09-extra-dashboard-voting branch September 13, 2022 09:01
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

Successfully merging this pull request may close these issues.

3 participants