Issue #95 open
Guillaume Englert
created an issue

Jobs are background tasks; they are useful for: periodic tasks (sending e-mail campaigns, receiving external e-mails...). tasks which can take a long time to be finished (CSV import, batvh processing...).

Comments (49)

  1. Guillaume Englert reporter

    refs #95 Initial version of the job system. CSV import & batch process are now jobs: the results page is now persitent, all errors are listed, the jobs can be resumed if there is a crash... The command 'reminder' has been replaced by a job ; the e-mails will be sent at the exact date. The 'crudity_synchronize' has been replaced by a job ; so the periodicity can be configured with a generic GUI.

    API breaking: - Reminder.execute() & Reminder.send_mails() take an additionnal 'job' arg. - (internal) Many changes in BatchProcessForm ; BatchOperator's init takes an additional argument 'id'. - (internal) Many changes in list_view_import.ImportForm. - The command 'reminder' has been removed. - The command 'crudity_synchronize' (in the app 'crudity') has been removed.

    → <<cset 016dff12e2b1>>

  2. Guillaume Englert reporter

    refs #95 Initial version of the job system. CSV import & batch process are now jobs: the results page is now persitent, all errors are listed, the jobs can be resumed if there is a crash... The command 'reminder' has been replaced by a job ; the e-mails will be sent at the exact date. The 'crudity_synchronize' has been replaced by a job ; so the periodicity can be configured with a generic GUI.

    API breaking: - Reminder.execute() & Reminder.send_mails() take an additionnal 'job' arg. - (internal) Many changes in BatchProcessForm ; BatchOperator's init takes an additional argument 'id'. - (internal) Many changes in list_view_import.ImportForm. - The command 'reminder' has been removed. - The command 'crudity_synchronize' (in the app 'crudity') has been removed.

    → <<cset 016dff12e2b1>>

  3. Guillaume Englert reporter

    refs #34 #95 The command 'usermessages_send' is now a job.

    API breaking: - The command 'usermessages_send' has been removed. - (internal) UserMessagesend_mails(): - Takes now an additional argument 'job'. - Catches the exceptions when sending e-mails, & do not send again the same e-mails.

    → <<cset dbcd8a94f398>>

  4. Guillaume Englert reporter

    refs #34 #95 The command 'usermessages_send' is now a job.

    API breaking: - The command 'usermessages_send' has been removed. - (internal) UserMessagesend_mails(): - Takes now an additional argument 'job'. - Catches the exceptions when sending e-mails, & do not send again the same e-mails.

    → <<cset dbcd8a94f398>>

  5. Guillaume Englert reporter

    refs #26 #95 Jobs can now have a custom configuration form ; Crudity sync use it for the default backend user.

    API breaking: - The setting CREME_GET_EMAIL_JOB_USER_ID is now only useful during the installation ; it will be removed in the next version.

    → <<cset 345558bfb78f>>

  6. Guillaume Englert reporter

    refs #26 #95 Jobs can now have a custom configuration form ; Crudity sync use it for the default backend user.

    API breaking: - The setting CREME_GET_EMAIL_JOB_USER_ID is now only useful during the installation ; it will be removed in the next version.

    → <<cset 345558bfb78f>>

  7. Guillaume Englert reporter

    refs #95 Remove 2 race conditions (only with PostgreSQL ?) when sending redis message in save() (because of the transaction). - When a (user) job was created, it could not be retrieved immediately by the job manager ; so a deffered job system has been added. - When a (system) job was edited, the job manager could retrieve the old data ; so new fields values are now sent in the message.

    Some other improvements: - The code for handling commands has been splitted in several methods. - The REFRESH handler does not need to retrieve the job (ie: SQL query) any more. - The jobs with invalid type are ignored (it crashed before).

    → <<cset 82c06779d4e9>>

  8. Guillaume Englert reporter

    refs #95 Remove 2 race conditions (only with PostgreSQL ?) when sending redis message in save() (because of the transaction). - When a (user) job was created, it could not be retrieved immediately by the job manager ; so a deffered job system has been added. - When a (system) job was edited, the job manager could retrieve the old data ; so new fields values are now sent in the message.

    Some other improvements: - The code for handling commands has been splitted in several methods. - The REFRESH handler does not need to retrieve the job (ie: SQL query) any more. - The jobs with invalid type are ignored (it crashed before).

    → <<cset 82c06779d4e9>>

  9. Guillaume Englert reporter

    refs #95 #77 Remove some code specific to Python < 3.2

    API breaking: - (internal) The functions 'python_subprocess()' in 'creme_core.utils.system.nt' & 'creme_core.utils.system.posix' have been removed (replaced by the one in 'creme_core.utils.system').

    → <<cset 9aead7271e75>>

  10. Guillaume Englert reporter

    refs #95 #77 Remove some code specific to Python < 3.2

    API breaking: - (internal) The functions 'python_subprocess()' in 'creme_core.utils.system.nt' & 'creme_core.utils.system.posix' have been removed (replaced by the one in 'creme_core.utils.system').

    → <<cset 9aead7271e75>>

  11. Guillaume Englert reporter

    refs #95 Two views for jobs are now class-based.

    API breaking: - 'creme_core.views.job.detailview()' has been removed ; use the class-based view 'JobDetail' instead. - 'creme_core.views.job.edit()' has been removed ; use the class-based view 'JobEdition' instead.

    → <<cset 32bb516d02dd>>

  12. Guillaume Englert reporter

    refs #95 Two views for jobs are now class-based.

    API breaking: - 'creme_core.views.job.detailview()' has been removed ; use the class-based view 'JobDetail' instead. - 'creme_core.views.job.edit()' has been removed ; use the class-based view 'JobEdition' instead.

    → <<cset 32bb516d02dd>>

  13. Guillaume Englert reporter

    refs #95 The views which list the Jobs are now class-based.

    API breaking: - In 'creme_core.views.jobs': - 'list_all()' has been removed ; use the class based-vew 'Jobs' instead. - 'list_mine()' has been removed ; use the class based-vew 'MyJobs' instead.

    → <<cset 6a2d272f9e1a>>

  14. Guillaume Englert reporter

    refs #95 The views which list the Jobs are now class-based.

    API breaking: - In 'creme_core.views.jobs': - 'list_all()' has been removed ; use the class based-vew 'Jobs' instead. - 'list_mine()' has been removed ; use the class based-vew 'MyJobs' instead.

    → <<cset 6a2d272f9e1a>>

  15. Log in to comment