Skip to content

Refresh machine list eagerly #38

Description

@fedjo
  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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions