{"id":21285497,"url":"https://github.com/takeyuweb/kyklos","last_synced_at":"2025-03-15T15:12:59.077Z","repository":{"id":56880615,"uuid":"74829451","full_name":"takeyuweb/kyklos","owner":"takeyuweb","description":"(Probably it is a buggy.) You can use the Amazon CloudWatch Events to schedule jobs on Ruby.","archived":false,"fork":false,"pushed_at":"2024-04-11T05:20:35.000Z","size":28,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T11:04:37.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/takeyuweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-26T14:08:23.000Z","updated_at":"2024-04-11T05:19:41.000Z","dependencies_parsed_at":"2022-08-20T13:00:12.568Z","dependency_job_id":null,"html_url":"https://github.com/takeyuweb/kyklos","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeyuweb%2Fkyklos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeyuweb%2Fkyklos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeyuweb%2Fkyklos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeyuweb%2Fkyklos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takeyuweb","download_url":"https://codeload.github.com/takeyuweb/kyklos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243746201,"owners_count":20341203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T11:20:45.436Z","updated_at":"2025-03-15T15:12:59.044Z","avatar_url":"https://github.com/takeyuweb.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kyklos\n\nYou can use the Amazon CloudWatch Events to schedule jobs on Ruby.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'kyklos'\n```\n\nAnd then execute:\n\n```sh\n$ bundle\n```\n\nOr install it yourself as:\n\n```sh\n$ gem install kyklos\n```\n\n## Usage\n\n### 1. Write your config/schedule.rb\n\n```sh\n$ vi config/schedule.rb\n```\n\n#### Example schedule.rb file\n\n```ruby\ncron '0/10 * * * ? *' do\n  Entry.publish_all\n  Entry.unpublish_all\nend\n\nrate '10 minutes' do\n  Temporary.destroy_all\nend\n\nrate '1 day', as: :recontraction do\n  Subscription.recontract_all\nend\n\nrate '1 day', as: :journalize_events do\n  Event.journalize\nend\n```\n\n### 2. Deploy\n\n```sh\n bundle exec kyklos -c config/schedule.rb --adapter shoryuken --adapter_args=https://sqs.ap-northeast-1.amazonaws.com/accountid/queue_name\n```\n\n#### AWS認証情報について\n\n##### 環境変数として渡す\n\n```sh\n$ AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxx \\\n\u003e AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \\\n\u003e AWS_REGION=ap-northeast-1 \\\n\u003e kyklos -c config/schedule.rb --adapter shoryuken --adapter_args=https://sqs.ap-northeast-1.amazonaws.com/accountid/queue_name\n```\n\n##### `aws configure`を使う\n\n```sh\n$ aws configure\nAWS Access Key ID [None]: xxxxxxxxxxxxxxxxxxxx\nAWS Secret Access Key [None]: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nDefault region name [None]: ap-northeast-1\nDefault output format [None]: json\n$ ls ~/.aws\nconfig  credentials\n$ kyklos -c config/schedule.rb --adapter shoryuken --adapter_args=https://sqs.ap-northeast-1.amazonaws.com/accountid/queue_name\n```\n\n### 3. Shoryuken\n\n#### 設定\n\n```sh\n$ vi kyklos_worker.rb\n```\n```ruby\nrequire 'kyklos'\nKyklos::Adapters::ShoryukenAdapter::Worker.config_path = 'config/schedule.rb'\nShoryuken.register_worker 'queue_name', Kyklos::Adapters::ShoryukenAdapter::Worker\n```\n\n```sh\n$ vi shoryuken.yml\n```\n```yaml\nconcurrency: 25\ndelay: 25\nqueues:\n     - [queue_name, 1]\n```\n\n#### ワーカーを開始\n\n```sh\n$ bundle exec shoryuken -r ./kyklos_worker.rb -C shoryuken.yml\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/takeyuweb/kyklos. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakeyuweb%2Fkyklos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakeyuweb%2Fkyklos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakeyuweb%2Fkyklos/lists"}