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

dashboard widget action on database #142

Open
skalimer0 opened this issue Jul 13, 2022 · 2 comments
Open

dashboard widget action on database #142

skalimer0 opened this issue Jul 13, 2022 · 2 comments

Comments

@skalimer0
Copy link
Contributor

Hello,

I try to create a widget who compute time's issues (from issue's status change) and insert them in the database for the current user.

But if i used a widget on a dashboard to to that : the job is done 4 times (perhaps because the server use 4 workers PUMA to run the server... i don't know...)

So, in database i have 4 inserts for the same time's issue, but the widget is present just one time in my dashboard and display my charts.

Can you help my to understand why my helper methods is call several times ?

In debug on my computer i don't have any problem.

Thanks a lot.

@skalimer0
Copy link
Contributor Author

I solve the problem with Mutex and synchronize method, but it's destabilizing to have multi execution for all my widgets by all the workers.

@skalimer0
Copy link
Contributor Author

One more thing, if i update settings, the widget (and the helper) is call just one time. The problem is only on dashboard's display.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants