P
P
panikerik2015-09-23 23:45:29
Ruby on Rails
panikerik, 2015-09-23 23:45:29

Doing update parameters after a specific time in rails?

there is something similar to
class CreateBooks < ActiveRecord::Migration
def change
create_table :books do |t|
t.string:name
t.boolean:active
t.boolean: rented t.string :
time
end
end
end javan/whenever but it seems there is something more logical

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
malroc, 2015-09-24
@malroc

RoR by itself does not work in the background (i.e. when no HTTP request is being made).
To execute tasks on a timer, in any case, you need a separate worker process. Then there may be options, whenever or something else, but in general, in modern projects, usually whenever.

C
CapeRatel, 2015-09-24
@CapeRatel

You set up a background. For example sidekiq
You start an activejob task.
Run it periodically every time

B
Biggless, 2015-10-14
@Biggless

I can advise clockwork instead of whenever.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question