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

Scheduling jobs on status page #1035

Merged
merged 16 commits into from
Apr 19, 2024
Merged

Scheduling jobs on status page #1035

merged 16 commits into from
Apr 19, 2024

Conversation

nrozanov
Copy link
Contributor

Description

Extend the current status page - add a simple table on the right of the data connectivity (or beneath) and show the last 10 or 20 jobs, with green or red lights, and with their status/error message available in a tool-tip or on click

Look & Feel

New table on the status page, containing data about latest asset jobs

How to test

Create some jobs for an asset, check they appear on status page of this asset

Further Improvements

.

Related Items

.


  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
@nrozanov nrozanov linked an issue Apr 10, 2024 that may be closed by this pull request
@nhoening nhoening changed the title add job cache by sensor id in create forecasting jobs Scheduling jobs on status page Apr 10, 2024
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach. I found a way to make it a bit simpler. And it should deal with scheduling.

flexmeasures/data/services/forecasting.py Outdated Show resolved Hide resolved
flexmeasures/data/services/job_cache.py Outdated Show resolved Hide resolved
flexmeasures/data/services/job_cache.py Show resolved Hide resolved
flexmeasures/data/tests/test_job_cache.py Show resolved Hide resolved
flexmeasures/conftest.py Outdated Show resolved Hide resolved
… use job_cache for scheduling jobs

Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
…and scheduling jobs on status page

Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, I like the structure.

Most comments about style & names. Very few about functionality.

flexmeasures/data/services/job_cache.py Outdated Show resolved Hide resolved
flexmeasures/data/services/scheduling.py Outdated Show resolved Hide resolved
flexmeasures/data/services/scheduling.py Outdated Show resolved Hide resolved
flexmeasures/data/services/sensors.py Outdated Show resolved Hide resolved
flexmeasures/data/services/sensors.py Outdated Show resolved Hide resolved
flexmeasures/data/services/job_cache.py Outdated Show resolved Hide resolved
flexmeasures/data/services/job_cache.py Outdated Show resolved Hide resolved
flexmeasures/ui/templates/views/status.html Show resolved Hide resolved
flexmeasures/data/services/job_cache.py Outdated Show resolved Hide resolved
flexmeasures/ui/templates/views/status.html Outdated Show resolved Hide resolved
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get more ideas while I try this, sorry.
Also found a few small things I want to improve.

Uninstalling highspy was a great way for me to test failing jobs, by the way.

flexmeasures/data/services/sensors.py Outdated Show resolved Hide resolved
flexmeasures/data/services/sensors.py Outdated Show resolved Hide resolved
flexmeasures/ui/templates/views/status.html Show resolved Hide resolved
flexmeasures/ui/crud/assets.py Outdated Show resolved Hide resolved
flexmeasures/data/services/sensors.py Outdated Show resolved Hide resolved
flexmeasures/ui/templates/views/status.html Show resolved Hide resolved
flexmeasures/ui/crud/assets.py Outdated Show resolved Hide resolved
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Just two very small comments left for me.

documentation/changelog.rst Outdated Show resolved Hide resolved
flexmeasures/ui/templates/views/status.html Outdated Show resolved Hide resolved
@nhoening
Copy link
Contributor

The type annotations do not work on Python3.8: https://github.com/FlexMeasures/flexmeasures/actions/runs/8712586908/job/23899218536?pr=1035

It seems that job_cache.py needs from __future__ import annotations

Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
@nhoening
Copy link
Contributor

You seem to have some import problems

Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
logfile Outdated Show resolved Hide resolved
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

…status

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening nhoening merged commit 031d6d6 into main Apr 19, 2024
7 of 9 checks passed
@nhoening nhoening deleted the status-page-scheduling-jobs branch April 19, 2024 18:42
@Flix6x Flix6x added this to the 0.21.0 milestone May 13, 2024
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.

Scheduling jobs on status page
3 participants