-
Notifications
You must be signed in to change notification settings - Fork 70
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
Improve Configuration, Status, Error handling #30
Open
dailypush
wants to merge
14
commits into
ancalentari:master
Choose a base branch
from
dailypush:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Implement pruning of old files after a specified number of days - Add optional feature to upload files to a network drive - Update the configuration file to include new options
This commit introduces significant changes to the TwitchRecorder script, enhancing its capability to handle multiple Twitch usernames and record their streams simultaneously. Key updates include: - Modified the loop_check method to remove the infinite loop, enabling the script to iterate over and check each username individually per execution cycle. - Revised the run method to implement a main loop that iterates over all usernames, ensuring each user is checked and processed in turn. - Enhanced error handling and logging in the check_user method to provide more detailed information about API request failures or other issues. - Updated command-line argument parsing to correctly split and handle multiple usernames, ensuring they are processed as individual elements rather than a single concatenated string. - Removed redundant and debugging print statements for cleaner code and efficient execution. These changes improve the script's efficiency and usability, allowing for robust and concurrent recording of multiple Twitch streams.
This commit introduces a significant enhancement to the TwitchRecorder script by adding a configurable limit for the maximum number of concurrent stream recordings. This feature is particularly beneficial for running the script on systems with limited resources, such as a Raspberry Pi. Changes include: - Updated the config.json file to include a new field 'max_concurrent_recordings', allowing users to specify the maximum number of streams that can be recorded simultaneously. - Modified the TwitchRecorder class to read this new setting from the config.json file, with a default value set to 2. This ensures backward compatibility for existing users who may not have this field in their configuration. - Implemented logic in the script to monitor and limit the number of active recordings based on this configuration, thereby preventing excessive resource usage on constrained systems. - Enhanced resource management by integrating psutil for system monitoring, enabling the script to make informed decisions about starting new recordings based on current CPU and memory usage. This update provides users with greater control over the script’s performance and resource utilization, ensuring more stable and efficient operation on various hardware setups.
- Implement real-time CPU and memory usage checks before initiating new recording checks. - Pause new recording checks if system resource usage is above predefined thresholds (50% CPU usage in this case). - This enhancement aims to prevent overloading the system, ensuring stable and efficient operation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Give the app a status bar to make sure files are still working
Added a json file for easier configuration