@cherrypy.expose<EOL><INDENT>@cherrypy.tools.json_in()<EOL>def add(self):<DEDENT>
payload = cherrypy.request.json<EOL>logger.debug("<STR_LIT>")<EOL>for task_data in payload['<STR_LIT>']:<EOL><INDENT>try:<EOL><INDENT>category = task_data['<STR_LIT>']<EOL>backend_args = task_data['<STR_LIT>']<EOL>archive_args = task_data.get('<STR_LIT>', None)<EOL>sched_args = task_data.get('<STR_LIT>', None)<EOL><DEDENT>except KeyError as ex:<EOL><INDENT>logger.error("<STR_LIT>")<EOL>raise ex<EOL><DEDENT>from_date = backend_args.get('<STR_LIT>', None)<EOL>if from_date:<EOL><INDENT>backend_args['<STR_LIT>'] = str_to_datetime(from_date)<EOL><DEDENT>super().add_task(task_data['<STR_LIT>'],<EOL>task_data['<STR_LIT>'],<EOL>category,<EOL>backend_args,<EOL>archive_args=archive_args,<EOL>sched_args=sched_args)<EOL><DEDENT>logger.debug("<STR_LIT>")<EOL>return "<STR_LIT>"<EOL>
Add tasks