Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Add random jitter to scan and join delay to appear more natural #61

Merged
merged 19 commits into from
Feb 28, 2023

Conversation

Mircoxi
Copy link
Contributor

@Mircoxi Mircoxi commented Feb 26, 2023

Hello! This is a small change to RaffleService to add some minor randomisation to the delays, after a friend of mine suggested it.

Simply put, it varies how often it scans by up to 60 seconds each time, and raffle join frequency by up to 10 seconds, effectively turning. This has two benefits:

  • It looks more natural in any server-side logs, and;
  • It more accurately reflects the current climate of the site - raffles tend to be only a few per hour now, so scanning every 5 seconds is just overkill.

No other changes are made other than this, but it seems like it could be useful so I figured I'd throw a PR in rather than keep it as an offshoot. Thanks!

Copy link
Owner

@depthbomb depthbomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea, however it should be an opt-in feature that the user can turn on in their settings.

Scraps/Services/RaffleService.cs Outdated Show resolved Hide resolved
Scraps/Services/RaffleService.cs Outdated Show resolved Hide resolved
Mircoxi and others added 6 commits February 28, 2023 14:13
… is now a private field, and variable names have been corrected.
…t for the extra settings fields.

Depending on OS theme the scrollbar can be barely visible, and most people are using at least 1366x768 nowadays so this seems like a justifiable enough change.
…ed together. Also adjusted TabIndex attributes so that the form can be navigated smoothly rather than jumping back to the Auto-increment checkbox midway through.
Merge dev branch into master
@Mircoxi
Copy link
Contributor Author

Mircoxi commented Feb 28, 2023

Thanks for the feedback! I've made these changes now, and I've set the default for the jitter options to be zero to make it opt-in. I also took the liberty of adjusting the default window size to accomodate the extra fields and fixed up the TabIndexes since they were a little out of whack. Let me know if anything else needs adjusting!

@depthbomb depthbomb merged commit 94eb86c into depthbomb:master Feb 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants