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

Loop through all virtual servers? #27

Open
cyber4len opened this issue Apr 30, 2018 · 1 comment
Open

Loop through all virtual servers? #27

cyber4len opened this issue Apr 30, 2018 · 1 comment

Comments

@cyber4len
Copy link

https://github.com/OnApp/SolusVM-WHMCS-Module/blob/75fea0ba429231d510555d5b3607d503b065bca8/modules/servers/solusvmpro/solusvmpro.php#L1152
this loop includes all virtual servers ever created by SolusVM module, even Pending/Cancelled/Terminated/Fraud/etc. It should be limited to VPS with status Active at least
We have several thousands of virtual servers in our system and latest cron task run took more than 50 minutes to complete SolusVM UsageUpdate hook.

Also, I think that UsageUpdate logic should be redesigned. Instead of current logic, it should only get available data from SolusVM and than loop through this data to update active virtual servers. In other words, it's much faster to execute one API call and then 10k updates in MySQL, rather than 10k API calls + 10k updates in MySQL

prado1991 pushed a commit that referenced this issue May 17, 2018
@prado1991
Copy link
Contributor

fixed in v. 4.1.1

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

No branches or pull requests

2 participants