Coder Social home page Coder Social logo

cloudwatch_scheduler's Introduction

Hi there ๐Ÿ‘‹

I'm Paul Sadauskas, and usually go by TheAmazingRando on the internet. I love Ruby and have been a Rails developer since there was a Rails (deployed my first application on 0.11 in 2005). I was a member of the DataMapper and Merb core teams, and have contributed to many open-source projects (both Ruby and non-Ruby) over the years.

  • ๐Ÿ”ญ Iโ€™m currently working on:
    • Scalar.sh โ€” A tool to autoscale servers with a simple configuration.
    • Logsnarf - A tool that receives your logs and write metrics to your TSDB.
  • ๐ŸŒฑ Iโ€™m currently learning Rust and woodworking.
  • ๐Ÿ’ฌ Ask me about Hanami, Dry-rb and the non-Rails Ruby ecosystem
  • ๐Ÿ“ซ How to reach me: Links are over there โ†ฉ๏ธ
  • ๐Ÿ˜„ Pronouns: he/him

cloudwatch_scheduler's People

Contributors

nbudin avatar paul avatar rud avatar thecentury avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cloudwatch_scheduler's Issues

failed to run rake cloudwatch_scheduler:setup

I am facing this issue.

rake aborted!
NameError: uninitialized constant ApplicationJob
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/cloudwatch_scheduler-1.1.1/lib/cloudwatch_scheduler/job.rb:4:in `<module:CloudwatchScheduler>'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/cloudwatch_scheduler-1.1.1/lib/cloudwatch_scheduler/job.rb:3:in `<main>'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/cloudwatch_scheduler-1.1.1/lib/cloudwatch_scheduler/engine.rb:8:in `block in <class:Engine>'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/railties-7.0.3.1/lib/rails/initializable.rb:32:in `instance_exec'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/railties-7.0.3.1/lib/rails/initializable.rb:32:in `run'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/railties-7.0.3.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/railties-7.0.3.1/lib/rails/initializable.rb:60:in `run_initializers'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/railties-7.0.3.1/lib/rails/application.rb:372:in `initialize!'
/Users/user/dev/demo-app/config/environment.rb:15:in `<main>'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/railties-7.0.3.1/lib/rails/application.rb:348:in `require_environment!'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/railties-7.0.3.1/lib/rails/application.rb:511:in `block in run_tasks_blocks'
/Users/user/.rbenv/versions/2.7.6/gemsets/demo-app/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
Tasks: TOP => cloudwatch_scheduler:setup => environment

Support Ruby3

cloudwatch_scheduler requires Ruby ~> 2.5.
Could you support Ruby3?

Understanding gem's mental model

Hi @paul, another quick question. I'm fairly new to the AWS world and I was wondering if I'm understanding how the gem works correctly:

Using the clock config (with clockwork dsl), it creates scheduled events in CloudWatch. Those events when run, schedule jobs in the SQS queue and the SQS worker (using Shoryuken) runs the body of the task?

So, does it completely skip using Heroku's own clock process?

Suggestions for IAM documentation

Before running rake cloudwatch_scheduler:setup I had to ensure that permission was granted on the resources used by this gem.

I'll watch for any permissions errors popping up while the scheduler runs, but as a start, these were required for setup. I'm happy to raise a PR to add this to the Readme if you think that's the best location for it.

            {
              "Version": "2012-10-17",
              "Statement": [
                {
                    "Effect": "Allow",
                    "Action": [
                        "sqs:*"
                    ],
                    "Resource": [
                        "arn:aws:sqs:REGION:AWS_ACCOUNT:cloudwatch_scheduler",
                        "arn:aws:sqs:REGION:AWS_ACCOUNT:cloudwatch_scheduler-failures"
                    ]
                },{
                    "Effect": "Allow",
                    "Action": [
                        "events:PutRule",
                        "events:PutTargets"
                    ],
                    "Resource": [
                        "*"
                    ]
                }
              ]
            }

Updating deps

Hi @paul, thanks for creating this excellent library!

I wasn't sure if this is still maintained but thought I'd bring it up just in case: it seems like the dependencies on aws-sdk-core and shoryuken are out of date, especially with aws recommending using individual service packages rather than the core.

Not subscribed to the queue

I'm starting shoryuken with a configuration file -C shoryuken.yml and I specify queues in that yaml.

Is it a good idea to expand the Readme to include a notice that we should specify the queue called cloudwatch_scheduler, either in a config file or in the startup command's -q flag?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.