-
Notifications
You must be signed in to change notification settings - Fork 18
Optimize thread usage and handle http exceptions. #7
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
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
85cf794
working on the scheduler
lvilya 5f4be72
savingBranch
lvilya 4590d4e
the final test is insihed
lvilya ef2c346
add bin folder to gitignore
lvilya e3b90ca
remive all bin folder changes"
lvilya e430073
add tests
lvilya 5232804
remove spec folder
lvilya 1258ed4
remove unused method
lvilya bfef45f
add the flush flag check
lvilya 0a77127
not working here??
lvilya ad1636d
not working chnges
lvilya e314f62
address the comments and improve the excpetion handling logic
lvilya 00d652c
add rubycop config file and run it
lvilya 25b7176
change the oprand
lvilya ca85153
forgot about one more
lvilya 88f86cc
address comments
lvilya 78e24c6
lints
lvilya a8c3ab1
change the locking logic ang change linting rules
lvilya a594976
add lamda for excpetion handling
lvilya 984b4c3
check lock owning
lvilya 14727eb
fix the bug and add the lock to the side messages
lvilya 4395fd7
lints
lvilya 068bc3d
remove redundant nil
lvilya ad965d4
remove the checking
lvilya 30eaaba
move the falg into lock
lvilya d94bbca
remove block
lvilya d8e4ad3
rubocop
lvilya 690fa67
forgot to move another flag swtich into the lock block
lvilya 86cc043
restore the possibility to pass blocks as messages
lvilya 9f86f72
change the logic to read easier
lvilya 443f8d0
update rubocop although it didd not have any effect. rubocop is stupid.
lvilya cdb6ced
commit
lvilya 1ecf5cb
conflicts
lvilya e66c44b
sdfsdf
lvilya 4316bf4
sdfsdF
lvilya 5a2ecaf
fix the dep
lvilya 1ac174b
address the comments
lvilya 9d30f80
remove the stray debug message
lvilya 40484a2
gitigone
lvilya 2de8895
remove the block
lvilya c9a07ff
gitingone
lvilya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,131 @@ | ||
| # Commonly used screens these days easily fit more than 80 characters. | ||
| Metrics/LineLength: | ||
| Max: 120 | ||
|
|
||
| # Too short methods lead to extraction of single-use methods, which can make | ||
| # the code easier to read (by naming things), but can also clutter the class | ||
| Metrics/MethodLength: | ||
| Max: 100 | ||
|
|
||
| # The guiding principle of classes is SRP, SRP can't be accurately measured by LoC | ||
| Metrics/ClassLength: | ||
| Max: 1500 | ||
|
|
||
| Metrics/AbcSize: | ||
| Max: 40 | ||
|
|
||
| Metrics/CyclomaticComplexity: | ||
| Max: 40 | ||
|
|
||
| Metrics/PerceivedComplexity: | ||
| Max: 40 | ||
|
|
||
| # No space makes the method definition shorter and differentiates | ||
| # from a regular assignment. | ||
|
|
||
| Layout/AccessModifierIndentation: | ||
| Enabled: true | ||
| IndentationWidth: 4 | ||
|
|
||
| # Single quotes being faster is hardly measurable and only affects parse time. | ||
| # Enforcing double quotes reduces the times where you need to change them | ||
| # when introducing an interpolation. Use single quotes only if their semantics | ||
| # are needed. | ||
| Style/StringLiterals: | ||
| EnforcedStyle: double_quotes | ||
|
|
||
| # We do not need to support Ruby 1.9, so this is good to use. | ||
| Style/SymbolArray: | ||
| Enabled: true | ||
|
|
||
| # Mixing the styles looks just silly. | ||
| Style/HashSyntax: | ||
| EnforcedStyle: ruby19_no_mixed_keys | ||
|
|
||
| # has_key? and has_value? are far more readable than key? and value? | ||
| Style/PreferredHashMethods: | ||
| Enabled: false | ||
|
|
||
| # String#% is by far the least verbose and only object oriented variant. | ||
| Style/FormatString: | ||
| EnforcedStyle: percent | ||
|
|
||
| Style/CollectionMethods: | ||
| Enabled: true | ||
| PreferredMethods: | ||
| # inject seems more common in the community. | ||
| reduce: "inject" | ||
|
|
||
| Style/UnneededInterpolation: | ||
| Enabled: flase | ||
|
|
||
| Style/RescueStandardError: | ||
| Enabled: flase | ||
|
|
||
| # Either allow this style or don't. Marking it as safe with parenthesis | ||
| # is silly. Let's try to live without them for now. | ||
| Style/ParenthesesAroundCondition: | ||
| AllowSafeAssignment: false | ||
| Lint/AssignmentInCondition: | ||
| AllowSafeAssignment: false | ||
|
|
||
| # A specialized exception class will take one or more arguments and construct the message from it. | ||
| # So both variants make sense. | ||
| Style/RaiseArgs: | ||
| Enabled: false | ||
|
|
||
| # Fail is an alias of raise. Avoid aliases, it's more cognitive load for no gain. | ||
| # The argument that fail should be used to abort the program is wrong too, | ||
| # there's Kernel#abort for that. | ||
| Style/SignalException: | ||
| EnforcedStyle: only_raise | ||
|
|
||
| # Suppressing exceptions can be perfectly fine, and be it to avoid to | ||
| # explicitly type nil into the rescue since that's what you want to return, | ||
| # or suppressing LoadError for optional dependencies | ||
| Lint/HandleExceptions: | ||
| Enabled: false | ||
|
|
||
| # { ... } for multi-line blocks is okay, follow Weirichs rule instead: | ||
| # https://web.archive.org/web/20140221124509/http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc | ||
| Style/BlockDelimiters: | ||
| Enabled: false | ||
|
|
||
| # do / end blocks should be used for side effects, | ||
| # methods that run a block for side effects and have | ||
| # a useful return value are rare, assign the return | ||
| # value to a local variable for those cases. | ||
| Style/MethodCalledOnDoEndBlock: | ||
| Enabled: true | ||
|
|
||
| # Enforcing the names of variables? To single letter ones? Just no. | ||
| Style/SingleLineBlockParams: | ||
| Enabled: false | ||
|
|
||
| # Shadowing outer local variables with block parameters is often useful | ||
| # to not reinvent a new name for the same thing, it highlights the relation | ||
| # between the outer variable and the parameter. The cases where it's actually | ||
| # confusing are rare, and usually bad for other reasons already, for example | ||
| # because the method is too long. | ||
| Lint/ShadowingOuterLocalVariable: | ||
| Enabled: false | ||
|
|
||
| # Check with yard instead. | ||
| Style/Documentation: | ||
| Enabled: false | ||
|
|
||
| # This is just silly. Calling the argument `other` in all cases makes no sense. | ||
| Naming/BinaryOperatorParameterName: | ||
| Enabled: false | ||
|
|
||
| # There are valid cases, for example debugging Cucumber steps, | ||
| # also they'll fail CI anyway | ||
| Lint/Debugger: | ||
| Enabled: false | ||
|
|
||
| # Style preference | ||
| Style/MethodDefParentheses: | ||
| Enabled: false | ||
|
|
||
| Style/TrailingCommaInHashLiteral: | ||
| Enabled: false |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 2.2.0 | ||
| 2.7.0 | ||
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.