An open API service indexing awesome lists of open source software.

https://github.com/megatux/heroku_streaming_csv

Sample application with ActionController::Live with slow generation of CSV file for surpasing Heroku's timeout
https://github.com/megatux/heroku_streaming_csv

heroku rails ruby timeouts

Last synced: 6 months ago
JSON representation

Sample application with ActionController::Live with slow generation of CSV file for surpasing Heroku's timeout

Awesome Lists containing this project

README

          

# README

This small app demostrates the use of `ActionController::Live` Rails controller concern to slowly generate a CSV file without triggering the Heroku's timeout limits of 30'' responses.

### Notes

* Ruby version: should be ok with 2.x

* Tested with rails 6.x and 7 edge

* No Database required

### Usage

Use the browser and follow the link to start the CSV generation that takes more than 30'' to finish or use a CLI tool like curl to see line by line the generated output:

`curl -i http://localhost:3000/exporter.csv`

Ouptut: ![app logs & curl output](https://i.ibb.co/4t4wWZ0/streaming-csv.gif)