ebbe / arask Goto Github PK
View Code? Open in Web Editor NEWAutomatic RAils taSKs.
License: MIT License
Automatic RAils taSKs.
License: MIT License
Hi im settings this gem up with docker. Where can i see the logs?
I'm running
ruby 3.1.2
Rails 6.1.3
server do
is not firing, what am i missing?
Line 55 in fe7d894
this is probably not allowing interval: 3.minutes
to work.
and following is not creating any task in db.
arask.create task: "ticker:complete_my_task", interval: 3.minutes
edit: seems like it works on local. but on AWS ECS it never puts a record in db.
Hello, i tried use gem, but after running docker container bundle install, rails return error:
method_missing': undefined method
server' for Arask::Railtie:Class (NoMethodError).
i am using:
In the latest version 1.2.4, after running bundle install
and restart the server, I am getting the below errors. After downgrading the version errors get resolved.
gems/railties-5.2.5/lib/rails/railtie.rb:192:in
method_missing': undefined method server' for Arask::Railtie:Class (NoMethodError)
I am trying to use arask to run a simple recurring rake task and it runs the first time but silently fails after that.
I have reproduced the issue in my repo in a branch called arask-test
https://github.com/travisdock/sum/tree/arask-test
The test branch contains a task (lib/tasks/test.rake
) that runs every minute. In the output below you can see that it runs the first time (Even though the arask output says 0 runs there is a 'puts' method that you can see prints "You did it"), but after that first run it never prints again even though arask jobs are enqueued and performed.
If you would like to run the project to see for yourself it is fully dockerized and you should be able to run it with just docker compose up
sum-web-1 | * Listening on http://0.0.0.0:3000
sum-web-1 | Use Ctrl-C to stop
sum-web-1 | [ActiveJob] [Arask::RunJobs] [c2db8cfb-4714-4a57-b916-9986e3764ffc] Performing Arask::RunJobs (Job ID: c2db8cfb-4714-4a57-b916-9986e3764ffc) from Async(default) enqueued at 2023-03-11T14:11:06Z
sum-web-1 | [ActiveJob] [Arask::RunJobs] [c2db8cfb-4714-4a57-b916-9986e3764ffc] TRANSACTION (0.2ms) BEGIN
sum-web-1 | [ActiveJob] [Arask::RunJobs] [c2db8cfb-4714-4a57-b916-9986e3764ffc] Arask::AraskJob Load (0.7ms) SELECT "arask_jobs".* FROM "arask_jobs" WHERE (execute_at < '2023-03-11 14:12:00.130862') FOR UPDATE
sum-web-1 | [ActiveJob] [Arask::RunJobs] [c2db8cfb-4714-4a57-b916-9986e3764ffc] Arask::AraskJob Update (0.5ms) UPDATE "arask_jobs" SET "execute_at" = $1, "updated_at" = $2 WHERE "arask_jobs"."id" = $3 [["execute_at", "2023-03-11 14:13:00"], ["updated_at", "2023-03-11 14:12:00.138032"], ["id", 4]]
sum-web-1 | Run options: --seed 30915
sum-web-1 |
sum-web-1 | # Running:
sum-web-1 |
sum-web-1 |
sum-web-1 |
sum-web-1 | Finished in 0.000800s, 0.0000 runs/s, 0.0000 assertions/s.
sum-web-1 | 0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
sum-web-1 | You did it
sum-web-1 | [ActiveJob] [Arask::RunJobs] [c2db8cfb-4714-4a57-b916-9986e3764ffc] Running daily recurring entries
sum-web-1 | [ActiveJob] [Arask::RunJobs] [c2db8cfb-4714-4a57-b916-9986e3764ffc] TRANSACTION (0.8ms) COMMIT
sum-web-1 | [ActiveJob] [Arask::RunJobs] [c2db8cfb-4714-4a57-b916-9986e3764ffc] Arask::AraskJob Load (0.3ms) SELECT "arask_jobs".* FROM "arask_jobs" ORDER BY "arask_jobs"."execute_at" ASC LIMIT $1 [["LIMIT", 1]]
sum-web-1 | [ActiveJob] [Arask::RunJobs] [c2db8cfb-4714-4a57-b916-9986e3764ffc] Enqueued Arask::RunJobs (Job ID: 179c6e14-f902-4af5-84bf-11d9ccce0055) to Async(default) at 2023-03-11 14:13:00 UTC
sum-web-1 | [ActiveJob] [Arask::RunJobs] [c2db8cfb-4714-4a57-b916-9986e3764ffc] Performed Arask::RunJobs (Job ID: c2db8cfb-4714-4a57-b916-9986e3764ffc) from Async(default) in 4143.04ms
sum-web-1 | [ActiveJob] [Arask::RunJobs] [179c6e14-f902-4af5-84bf-11d9ccce0055] Performing Arask::RunJobs (Job ID: 179c6e14-f902-4af5-84bf-11d9ccce0055) from Async(default) enqueued at 2023-03-11T14:12:04Z
sum-web-1 | [ActiveJob] [Arask::RunJobs] [179c6e14-f902-4af5-84bf-11d9ccce0055] TRANSACTION (0.2ms) BEGIN
sum-web-1 | [ActiveJob] [Arask::RunJobs] [179c6e14-f902-4af5-84bf-11d9ccce0055] Arask::AraskJob Load (0.4ms) SELECT "arask_jobs".* FROM "arask_jobs" WHERE (execute_at < '2023-03-11 14:13:00.088752') FOR UPDATE
sum-web-1 | [ActiveJob] [Arask::RunJobs] [179c6e14-f902-4af5-84bf-11d9ccce0055] Arask::AraskJob Update (0.4ms) UPDATE "arask_jobs" SET "execute_at" = $1, "updated_at" = $2 WHERE "arask_jobs"."id" = $3 [["execute_at", "2023-03-11 14:14:00"], ["updated_at", "2023-03-11 14:13:00.094966"], ["id", 4]]
sum-web-1 | [ActiveJob] [Arask::RunJobs] [179c6e14-f902-4af5-84bf-11d9ccce0055] TRANSACTION (1.1ms) COMMIT
sum-web-1 | [ActiveJob] [Arask::RunJobs] [179c6e14-f902-4af5-84bf-11d9ccce0055] Arask::AraskJob Load (0.3ms) SELECT "arask_jobs".* FROM "arask_jobs" ORDER BY "arask_jobs"."execute_at" ASC LIMIT $1 [["LIMIT", 1]]
sum-web-1 | [ActiveJob] [Arask::RunJobs] [179c6e14-f902-4af5-84bf-11d9ccce0055] Enqueued Arask::RunJobs (Job ID: d7377188-436b-410c-b24e-5b243e53fa7c) to Async(default) at 2023-03-11 14:14:00 UTC
sum-web-1 | [ActiveJob] [Arask::RunJobs] [179c6e14-f902-4af5-84bf-11d9ccce0055] Performed Arask::RunJobs (Job ID: 179c6e14-f902-4af5-84bf-11d9ccce0055) from Async(default) in 963.99ms at 2023-03-11 14:15:00 UTC
Hi,
first of all, thank you for your work with arask. I use it in a small Rails project and it works great!
I tried to upgrade my project to Rails 6, but when I tried to install the new gems I got an error that arask has a dependency on Rails 5. I changed the dependencies within the gemspec file and did a short test run within my application where everything worked fine with arask.
Would you consider changing the gemspec file to accept Rails ">= 5.0.0"?
Ok, so I have the following issue:
When running
RAILS_ENV=production rake assets:precompile
normally Rails does not touch the database. This is important for example in docker, when the db is not yet set up in the building process. So using your gem breaks the typical docker building process.
However, using your gem it started to connect to the database (or at least go through the database.yml file which it doesnt do otherwise). This could also be because of some of your dependencies (however it seems you are not using any).
Do you have any ideas about this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.