davidawad / SpaceShare

Hobby file table with integer keys, written using Python, Flask, nginx, Celery, Redis, React and Mongo.
41 stars 14 forks source link

use celery for a distributed task queue through redis #28

Open davidawad opened 9 years ago

davidawad commented 9 years ago

celery can delete files after a given period of time.

http://blog.miguelgrinberg.com/post/using-celery-with-flask

davidawad commented 9 years ago

remove files after x number of minutes in the background

davidawad commented 9 years ago

something like

@app.task
def remove_permanent( spacenum, seconds=(10*60) )
    time.sleep(seconds)
# do work