Task List

TODOs

  • 1. Remote file list (given a folder) and transfer (given a file name).

  • 2. Results table:

    • When a task is executed, it would be nice to have some sort of parameter like this:
store_results = None # Don't store results
store_results = ['*.txt'] # Store as results all *.txt files
store_results = ['filename1', 'filename2'] # Store as results files ( a result entry per file)
⁠⁠⁠⁠store_results = ["*", "!*.nxs"]⁠⁠⁠⁠ # All files except *.nxs
  • 3. Examples with the password caching using something default in Django. Ideas:
  • SESSION_ENGINE = "django.contrib.sessions.backends.cache"⁠⁠⁠⁠. It uses memory sessions (rather than the DB) for all sessions. The problem is when the memory runs out the sessions disappear..... The server would eventually purge the cache and make the user put on their passwords again...

https://docs.djangoproject.com/en/1.10/topics/http/sessions/#using-cached-sessions

Session data will be stored directly in your cache. However, session data may not be persistent: cached data can be evicted if the cache fills up or if the cache server is restarted.

  • 4. Log model needs a flag to tag the log either as stdout or stderr.

  • 5. Choose the interpreter in ⁠⁠⁠⁠submit_task⁠. E.g. a parameter like ⁠⁠⁠⁠interpreter='/usr/bin/python3⁠⁠ or ⁠⁠⁠⁠interpreter='/usr/bin/bash⁠⁠.

  • 6. Minimize dependencies (Let's keep just celery and redis for now).

  • 7. submit_task needs a timeout. We have to see how to kill the process remotely and interrupt the celery task...

  • 8. Ideas (not urgent!):

  • Using django-channels to have a real update of the tasks. See example: https://github.com/VincentTide/django-channels-celery-example

  • Use django-celery-results to see in the admin the celery results tables.