Skip to content

Loop through all virtual servers? #27

@cyber4len

Description

@cyber4len

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions