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

Refresh machine list eagerly #38

Open
fedjo opened this issue Mar 26, 2025 · 0 comments
Open

Refresh machine list eagerly #38

fedjo opened this issue Mar 26, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@fedjo
Copy link
Contributor

fedjo commented Mar 26, 2025

  1. Job that refreshes machine list needs to runs more often and eagerly re-schedule related jobs when changes found
  2. Get UAV locations from parcel related information

Description

  1. The problem is that for any change in the machine/uav list, FC does not have a mechanism to inform the weather srv. Thus weather srv needs to have a mechanism (a job) to run periodically (let's say every 1 minute) to detect if changes exist and if so to refresh the weather srv machine list and update the forecasts provided.

  2. As a step forward, this job also needs to get the parcel info (the location) of the machine from the machines object list /api/v1/AgriCulturalMachines provided by the FC.
    Currently, parcel locations are retrieved form /api/v1/FarmParcels and there is no way to associate a machine with a specific parcel. That way we will be able to calculate forecasts only for the parcel that the machine belongs. Machine info need to be cached internally in the WSRV. A dict structure can be used as:

{
   'machine_identifier': [(lat1, lon1), (lat2, lon2)]
}

Note: These changes will eventually affect the way that the jobs are scheduled and also the dao method which detects if forecast has already been calculated for a machine

@fedjo fedjo added the enhancement New feature or request label Mar 26, 2025
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

1 participant