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
/** | |
* Logs the user into the specified Cognito User Pool and prints out JWT tokens | |
* @example | |
* $ node cognito-login.js username="john.doe" password="j0hn.d0e" user-pool-id="us-east-1_Xxxxxxxx" app-client-id="2axxyyxxyxxxyyxxxyy" | |
* { | |
* "accessToken": "eyJra...aQ", | |
* "identityToken": "eyJra...iA", | |
* "refreshToken": "eyJj...Wg" | |
* } | |
*/ |
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
class QueueSizeMetricWorker | |
include Sidekiq::Worker | |
include Sidetiq::Schedulable | |
recurrence { minutely } | |
sidekiq_options retry: false | |
# Publish a custom metric on CloudWatch with the Sidekiq queue size | |
def perform | |
cloudwatch = Aws::CloudWatch::Client.new( |