Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance management of Job Schedulers #2875

Open
lpoulin opened this issue Oct 30, 2024 · 2 comments
Open

Enhance management of Job Schedulers #2875

lpoulin opened this issue Oct 30, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@lpoulin
Copy link

lpoulin commented Oct 30, 2024

Is your feature request related to a problem? Please describe.
It is a little frustrating that you cannot get all of the data back on a job scheduler that it was created with. I would like to display job schedulers in our application so they can be modified, but there doesn't appear to be a way to view the job template, so I can't populate the form with the existing values before upserting.

Describe the solution you'd like
It would be nice if JobScheduler could be its own type instead of trying to squeeze it into RepeatableJob, since the class lacks all of the properties that a job scheduler has, like the job template. Perhaps the API could also support getting jobs that were produced by a job scheduler, or at least have some indication on the Job itself that it was produced by a job scheduler.

Additionally, I would like to be able query for a single job scheduler, instead of fetching all of them from a queue and then filtering on the ID.

Additional context

{"key":"ExampleJobScheduler","name":"ExampleJobScheduler","endDate":null,"tz":null,"pattern":"*/30 * * * * *","every":null,"next":1730314440000}

Above is all of the information you get back when retrieving a job scheduler. How am I supposed to know what the job template looks like so I can determine if I need to make changes to it?

@roggervalf roggervalf added the enhancement New feature or request label Oct 31, 2024
github-actions bot pushed a commit that referenced this issue Nov 2, 2024
# [5.23.0](v5.22.0...v5.23.0) (2024-11-02)

### Features

* **scheduler:** add getJobScheduler method ([#2877](#2877)) ref [#2875](#2875) ([956d98c](956d98c))
alexandresoro pushed a commit to alexandresoro/ouca that referenced this issue Nov 3, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [bullmq](https://bullmq.io/) ([source](https://github.com/taskforcesh/bullmq)) | dependencies | minor | [`5.21.2` -> `5.23.0`](https://renovatebot.com/diffs/npm/bullmq/5.21.2/5.23.0) |

---

### Release Notes

<details>
<summary>taskforcesh/bullmq (bullmq)</summary>

### [`v5.23.0`](https://github.com/taskforcesh/bullmq/releases/tag/v5.23.0)

[Compare Source](taskforcesh/bullmq@v5.22.0...v5.23.0)

##### Features

-   **scheduler:** add getJobScheduler method ([#&#8203;2877](taskforcesh/bullmq#2877)) ref [#&#8203;2875](taskforcesh/bullmq#2875) ([956d98c](taskforcesh/bullmq@956d98c))

### [`v5.22.0`](https://github.com/taskforcesh/bullmq/releases/tag/v5.22.0)

[Compare Source](taskforcesh/bullmq@v5.21.2...v5.22.0)

##### Bug Fixes

-   **commands:** add missing build statement when releasing \[python] ([#&#8203;2869](taskforcesh/bullmq#2869)) fixes [#&#8203;2868](taskforcesh/bullmq#2868) ([ff2a47b](taskforcesh/bullmq@ff2a47b))

##### Features

-   **job:** add getChildrenValues method \[python] ([#&#8203;2853](taskforcesh/bullmq#2853)) ([0f25213](taskforcesh/bullmq@0f25213))
-   **queue:** add a telemetry interface ([#&#8203;2721](taskforcesh/bullmq#2721)) ([273b574](taskforcesh/bullmq@273b574))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xNDAuMiIsInVwZGF0ZWRJblZlciI6IjM4LjE0Mi4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/290
Reviewed-by: Alexandre Soro <code@soro.dev>
Co-authored-by: renovate <renovate@git.tristess.app>
Co-committed-by: renovate <renovate@git.tristess.app>
github-actions bot pushed a commit that referenced this issue Dec 2, 2024
# [5.31.0](v5.30.1...v5.31.0) (2024-12-02)

### Features

* **queue:** enhance getJobScheduler method to include template information ([#2929](#2929)) ref [#2875](#2875) ([cb99080](cb99080))
alexandresoro pushed a commit to alexandresoro/ouca that referenced this issue Dec 4, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [bullmq](https://bullmq.io/) ([source](https://github.com/taskforcesh/bullmq)) | dependencies | minor | [`5.29.1` -> `5.31.1`](https://renovatebot.com/diffs/npm/bullmq/5.29.1/5.31.1) |

---

### Release Notes

<details>
<summary>taskforcesh/bullmq (bullmq)</summary>

### [`v5.31.1`](https://github.com/taskforcesh/bullmq/releases/tag/v5.31.1)

[Compare Source](taskforcesh/bullmq@v5.31.0...v5.31.1)

##### Bug Fixes

-   **scheduler-template:** remove console.log when getting template information ([#&#8203;2950](taskforcesh/bullmq#2950)) ([3402bfe](taskforcesh/bullmq@3402bfe))

### [`v5.31.0`](https://github.com/taskforcesh/bullmq/releases/tag/v5.31.0)

[Compare Source](taskforcesh/bullmq@v5.30.1...v5.31.0)

##### Features

-   **queue:** enhance getJobScheduler method to include template information ([#&#8203;2929](taskforcesh/bullmq#2929)) ref [#&#8203;2875](taskforcesh/bullmq#2875) ([cb99080](taskforcesh/bullmq@cb99080))

### [`v5.30.1`](https://github.com/taskforcesh/bullmq/releases/tag/v5.30.1)

[Compare Source](taskforcesh/bullmq@v5.30.0...v5.30.1)

##### Bug Fixes

-   **flow:** allow using removeOnFail and failParentOnFailure in parents ([#&#8203;2947](taskforcesh/bullmq#2947)) fixes [#&#8203;2229](taskforcesh/bullmq#2229) ([85f6f6f](taskforcesh/bullmq@85f6f6f))

### [`v5.30.0`](https://github.com/taskforcesh/bullmq/releases/tag/v5.30.0)

[Compare Source](taskforcesh/bullmq@v5.29.1...v5.30.0)

##### Bug Fixes

-   **job-scheduler:** upsert template when same pattern options are provided ([#&#8203;2943](taskforcesh/bullmq#2943)) ref [#&#8203;2940](taskforcesh/bullmq#2940) ([b56c3b4](taskforcesh/bullmq@b56c3b4))

##### Features

-   **queue:** add getDelayedCount method \[python] ([#&#8203;2934](taskforcesh/bullmq#2934)) ([71ce75c](taskforcesh/bullmq@71ce75c))
-   **queue:** add getJobSchedulersCount method ([#&#8203;2945](taskforcesh/bullmq#2945)) ([38820dc](taskforcesh/bullmq@38820dc))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xNDIuNyIsInVwZGF0ZWRJblZlciI6IjM4LjE0Mi43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/361
Reviewed-by: Alexandre Soro <code@soro.dev>
Co-authored-by: renovate <renovate@git.tristess.app>
Co-committed-by: renovate <renovate@git.tristess.app>
@manast
Copy link
Contributor

manast commented Dec 4, 2024

@lpoulin sorry for not answering sooner, we have discussed a bit about the issues you bring up, which are very valid ones. The job scheduler concept is a new concept to improve the quite bad APIs we had for repeatable jobs until now, but we had to make some compromises not to require breaking changes. We will try to address your requests in later releases.

@lpoulin
Copy link
Author

lpoulin commented Dec 5, 2024

thanks for the update @manast! and thank you for considering my feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants