-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from Tapjoy/update_aws_gem
OPER-5336 Update AWS SDK library
- Loading branch information
Showing
38 changed files
with
751 additions
and
521 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
# Delayed Jobs, Backoffs and SQS | ||
|
||
We handle delays in SQS by changing the `VisiblityTimeout` of the in flight message. This operation is *additive*, | ||
meaning if you have a Queue with a default `VisiblityTimeout` of 5 minutes, the message is processed then fails 1 | ||
minute after the message is sent, and the step function returns 60 seconds, the new `VisiblityTimeout` of the message | ||
will be at 5 minutes. | ||
We handle delays in SQS by changing the `VisibilityTimeout` of the in-flight message. This operation is *additive*, | ||
meaning a queue has a default `VisibilityTimeout` of 5 minutes, the message is processed then fails 1 minute after the | ||
message is sent, and the step function returns 60 seconds, the new `VisibilityTimeout` of the message will be at 5 | ||
(rather than 4) minutes. | ||
|
||
This means small steps will not behave as you might expect, unless you have a `VisiblityTimeout` of 0. However, a | ||
`VisiblityTimeout` of 0 would cause the message to never remain in flight and would likely break the entire world. You | ||
want the default `VisiblityTimeout` to be as low as possible, but not low enough that it could be waiting in a Chore | ||
batch when the timeout hits 0 (causing the job to process twice!). | ||
This means small steps will not behave as one might expect, unless `VisibilityTimeout` is set to 0. However, a | ||
`VisibilityTimeout` of 0 would cause the message to never remain in flight and would likely break the entire world | ||
when every worker tries to work a copy of the same job. The default `VisibilityTimeout` should be set as low as possible | ||
given the expected execution duration of the job code, but not so low that the message might be still be waiting to be | ||
scheduled on a Chore worker when the timeout hits 0 (causing the job to process twice!). | ||
|
||
Something else to consider is the `RetentionPeriod` of a queue. If the `RetentionPeriod` is 1 hour, and an initial | ||
message continues to retry through that hour, it will suddenly disappear! That is to say: the `Retentionperiod` starts | ||
message continues to retry through that hour, it will suddenly disappear! That is to say: the `RetentionPeriod` starts | ||
counting down from the moment the message is *first* sent, and does not reset. | ||
|
||
And finally, if the queue has a `DeliveryDelay` configured any delay applied by the backoff function will be *in | ||
addition* to the `DeliveryDelay` when the message is removed from its "in flight" status. | ||
Finally, if the queue has a `DeliveryDelay` configured any delay applied by the backoff function will be *in addition* | ||
to the `DeliveryDelay` when the message is removed from its "in flight" status. | ||
|
||
All of this should be taken into consideration when using this feature. In general, any queue requiring this will likely | ||
need to run as its own Facet and not share workers with other queues. | ||
|
||
### Further Reading | ||
|
||
* [Expanded Documentation](docs/Delayed Jobs.md) | ||
* [SQS VisiblityTimeout](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AboutVT.html) | ||
* [SQS Delay Queues](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html) | ||
* [SQS Message Lifecycle](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/MessageLifecycle.html) | ||
* [SQS Message Lifecycle](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-basic-architecture.html) | ||
* [SQS VisibilityTimeout](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) | ||
* [SQS Delay Queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# How To Release Chore | ||
|
||
## Non-Tapjoy Contributors | ||
|
||
1. Open a PR against the main branch (currently `master`) with the changes in it | ||
- make sure to update the [version](../lib/chore/version.rb)! | ||
|
||
1. Tag (at least) a Tapjoy engineer for review when the PR is ready | ||
(see [Contributors](https://github.com/Tapjoy/chore/graphs/contributors) page) | ||
|
||
1. Assuming the PR is accepted, a Tapjoy engineer will cut a release with the changes. | ||
|
||
## Tapjoy Engineers | ||
|
||
Once a PR has been reviewed and accepted for release | ||
|
||
1. Merge the PR into the main branch | ||
|
||
1. [Create a new GitHub Release](https://github.com/Tapjoy/chore/releases/new) based on the updated main branch and tag | ||
it with the appropriate version (e.g. v4.0.0). Make sure to provide a useful title (PR title, for example) and | ||
description. | ||
|
||
A new release should subsequently show up in the GitHub [Releases](https://github.com/Tapjoy/chore/releases) page | ||
|
||
1. Generate and publish YARD documentation | ||
|
||
``` | ||
bundle exec rake yard | ||
bundle exec rake yard:publish | ||
``` | ||
The [Chore Github Pages](https://tapjoy.github.io/chore) site should be updated with the updated documentation. | ||
1. Build and publish the new gem to RubyGems | ||
``` | ||
gem build chore-core.gemspec | ||
gem push chore-core-${GEM_VERSION}.gem | ||
``` |
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
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
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
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
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
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
Oops, something went wrong.