B
B
Bogdan2018-03-26 11:12:56
Ruby on Rails
Bogdan, 2018-03-26 11:12:56

Completing tasks?

Hello. Tell me please. How to better organize the execution of tasks, for example, you need to make a Post-request to the server every minute, and, depending on the result, send a mailout to users. Well, there are already developments on how to make a post-request and mailing list, but there is no experience yet on how to organize the execution of tasks. Can you share your ideas? Thank you.
P.S. The server runs on Windows.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Artur Bordenyuk, 2018-03-26
@HighQuality

If the task is simple and runs very quickly, then it is enough to write a task inside the rail and pull it with the crown.
If mailing to many, many users, then everything starts the same way - with a task, but continues in the queue.
The task fills the queue with tasks to send a letter to each user. The queue is a little bit sorted out with all the letters.
Task to pull the crown. The queue is optional. I prefer sidekiq
for cron there's a good gem whenever

R
Roman Mirilaczvili, 2018-06-15
@2ord

I agree with what Arthur wrote , but instead of whenever, I suggest using clockwork, since you can start the process once in the background, and not launch the framework every minute, unnecessarily loading the system.

S
Sergey Blokhin, 2018-03-26
@TITnet

Cron

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question