cloudtasker icon indicating copy to clipboard operation
cloudtasker copied to clipboard

Basic CloudScheduler implementation

Open ceritium opened this issue 3 years ago • 0 comments

Hi, based on this issue https://github.com/keypup-io/cloudtasker/issues/20, I implemented a pretty basic cloud scheduler backend for period jobs.

I am testing it on a personal project. I trigger the "synchronize!" method with a rake task from cloud build, but I don't have experience deploying apps on Google Cloud and Google Cloud Run, so I am unsure if it is the best approach.

My rake task looks like this:

# app.rake

namespace :app do
  task setup_cloud_scheduler: :environment do
    Cloudtasker::CloudScheduler::Manager.synchronize!('config/cloudtasker_cron.yml')
  end
end

And the config file:

# config/cloudtasker_cron.yml

check_feeds_test:
  worker: 'CheckSubscriptionsJob'
  cron: '0 * * * *'

Of course, the PR needs some specs and some refactoring, but I would like your opinion about the general approach before investing time in working on the details.

Many thanks!

ceritium avatar Sep 25 '22 20:09 ceritium