Skip to content

Expose TaskSchedule in plugin API and add args/kwargs#7609

Open
daviddavis wants to merge 1 commit intopulp:mainfrom
daviddavis:task-schedule-kwargs
Open

Expose TaskSchedule in plugin API and add args/kwargs#7609
daviddavis wants to merge 1 commit intopulp:mainfrom
daviddavis:task-schedule-kwargs

Conversation

@daviddavis
Copy link
Copy Markdown
Contributor

@daviddavis daviddavis commented Apr 18, 2026

The plugin writer docs say that plugin writers can schedule tasks but the TaskSchedule model doesn't appear to be exposed in the plugin API. This adds the task schedule classes to the plugin API. Also, we're adding a JSONField 'task_kwargs' to TaskSchedule so that plugins can store keyword arguments to pass to tasks when they are dispatched on schedule.

closes #7608

Generated by: GitHub Copilot (Claude)

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

@daviddavis daviddavis force-pushed the task-schedule-kwargs branch from fec3364 to 4df22bd Compare April 18, 2026 12:38
Comment thread docs/dev/learn/other/task-scheduling.md Outdated
Comment thread pulpcore/tasking/_util.py
Comment thread pulpcore/app/models/task.py Outdated
Comment thread pulpcore/app/serializers/task.py Outdated
@daviddavis daviddavis force-pushed the task-schedule-kwargs branch 4 times, most recently from e8c1f4f to e558e79 Compare April 21, 2026 21:59
@daviddavis daviddavis changed the title Expose TaskSchedule in plugin API and add kwargs Expose TaskSchedule in plugin API and add args/kwargs Apr 21, 2026
The [plugin writer docs say that plugin writers can schedule
tasks](https://pulpproject.org/pulpcore/docs/dev/learn/other/task-scheduling)
but the TaskSchedule model doesn't appear to be exposed in the plugin
API.

Also, add encrypted JSONFields for args and kwargs to TaskSchedule so
that plugins can store keyword arguments to pass to tasks when they are
dispatched on schedule. The dispatch logic now forwards these to
dispatch().

closes pulp#7608

Generated by: GitHub Copilot (Claude)
@daviddavis daviddavis force-pushed the task-schedule-kwargs branch from e558e79 to abff0a4 Compare April 21, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow plugin writers to schedule tasks with kwargs

2 participants