- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
[fix] Fix that RSS is never returned on Windows #1
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for your fix! Please see a small comment
        
          
                index.js
              
                Outdated
          
        
      | if (process.platform == 'win32') { | ||
| // For Windows, WMIC.exe never returns any value for "Status" and it causes "WorkingSetSize" is set at columns[3] | ||
| // See: https://docs.microsoft.com/ja-jp/windows/win32/cimwin32prov/win32-process?redirectedfrom=MSDN | ||
| columns[4] = parseInt(columns[3], 10); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be safer to just skip "Status" in the WMIC call above. In case WMIC shows some non-empty string for it, this code here will fail.
| @pocesar | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
| Merged and published, will get to Apify SDK soon - apify/crawlee#1017 | 
RSS is always returned as NaN, and I think it causes that the "mainProcessBytes" in the response of "Apify.getMemoryInfo" is always returned as "NaN" on Windows environment.