Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8746553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:12:45+00:00 2026-06-13T12:12:45+00:00

I have a task which will take around 20 – 30 seconds. I want

  • 0

I have a task which will take around 20 – 30 seconds. I want this task to run immediately after a view is rendered. I want the output of this task to be stored in a session variable. What is the simplest way to do it rails 3.

To explain what i need exactly. I am showing a list of tweets to users (this is the view rendered) They have to go through them. I want a method to be invoked after this view is rendered which will take the same tweets and cluster them (20-30 seconds process). I should have the results of the clustering in the session so that i can display them in the next page.

How do I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:12:45+00:00Added an answer on June 13, 2026 at 12:12 pm

    This is how I solved the problem

    1. I used resque for background tasks. I enqueued the task just before the render was called.
    2. I coded the background worker to put the result of the clustering in a redis cache.
    3. The controller where the clusters are supposed to be shown, I read the results from redis, deserialized them and rendered them.

    It was not perfect but it was fast enough for a research feedback collection tool.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a task which has to be run everyday. I will get just
I have a model Task which will HABTM many TaskTargets. When it comes to
This is a simplified task which I have to solve in real project. In
i have extend a uiapplication for user interface,in which i will take a date
I have a task which I need to run in the background in my
i have task which takes a parameter and has three modes of results Example
I'm using dhtmlx Gantt Chart UI component which have task list and graphical chart.
I have an interesting scenario. I have a task model which has a task
I have a task/mini project to complete which is along the lines of GUI
I have a task to develop an electronic phone book in which i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.