Closed maheshsattala closed 1 week ago
This pull request introduces multiple enhancements across various files in the Kairon project. Key updates include the addition of a new TASK_TYPE
enumeration for categorizing tasks, modifications to method signatures to accept additional parameters, and the implementation of logging for task executions. These changes aim to improve the flexibility and clarity of task management and scheduling functionalities within the application.
Files | Change Summary |
---|---|
kairon/actions/definitions/schedule.py |
Added imports for EventClass and TASK_TYPE . |
kairon/async_callback/processor.py |
Modified run_pyscript to include task_type in CloudUtility.trigger_lambda . |
kairon/events/executors/base.py |
Enhanced execute_task with **kwargs and added log_task for logging task execution details. |
kairon/events/executors/dramatiq.py |
Modified execute_task to include **kwargs . |
kairon/events/executors/lamda.py |
Updated execute_task to accept **kwargs and modified lambda invocation with new parameters. |
kairon/events/executors/standalone.py |
Modified execute_task to include **kwargs . |
kairon/events/scheduler/base.py |
Updated add_job and update_job methods to include task_type . |
kairon/events/scheduler/kscheduler.py |
Modified add_job and update_job to accept task_type . |
kairon/events/utility.py |
Updated add_job and update_job to consistently pass task_type . |
kairon/shared/actions/utils.py |
Modified perform_web_search and run_pyscript to include task_type . |
kairon/shared/cloud/utils.py |
Enhanced trigger_lambda with new parameters and improved logging/error handling. |
kairon/shared/data/constant.py |
Introduced TASK_TYPE enumeration for task categorization. |
kairon/shared/events/data_objects.py |
Added ExecutorLogs class for logging task execution details. |
tests/unit_test/callback_test.py |
Updated test_run_pyscript to include task_type . |
tests/unit_test/events/executors_test.py |
Modified calls to execute_task to include task_type . |
tests/unit_test/events/scheduler_test.py |
Updated add_job and update_job tests to use TASK_TYPE . |
EmailAction
class, potentially affecting how scheduled actions are processed.ActionSchedule
class, which is explicitly designed for scheduling actions.get_stories
method to include handling for schedule_action
, indicating a direct connection to scheduling functionality.ScheduleActionRequest
class, which is directly related to scheduling functionalities.dispatch_event
method in the KScheduler
class, enhancing event handling capabilities relevant for scheduling actions.In the meadow where the bunnies play,
New tasks hop in, brightening the day.
With logs to track each joyful leap,
Scheduling dreams, our secrets to keep.
Hooray for changes, letβs dance and cheer,
For every new task brings us near! π°β¨
[!TIP]
New features
Walkthrough comment now includes: - Possibly related PRs: A list of potentially related PRs to help you recall past context. - Suggested labels: CodeRabbit can now suggest labels by learning from your past PRs. You can also provide custom labeling instructions in the UI or configuration file. Notes: - Please share any feedback in the [discussion post](https://discordapp.com/channels/1134356397673414807/1282535539299323995) on our Discord. - Possibly related PRs, automatic label suggestions based on past PRs, learnings, and possibly related issues require data opt-in (enabled by default).
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Added code for executor logs and fixed respective test cases
Summary by CodeRabbit
New Features
TASK_TYPE
enumeration to categorize different task types (Action, Event, Callback).ExecutorLogs
class.Improvements
task_type
parameter for better context during task execution and scheduling.trigger_lambda
method.Bug Fixes
task_type
parameter for accurate task execution validation.