-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae42f9e
commit f412911
Showing
14 changed files
with
198 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from Scheduler.SchedulerClass import SchedulerService | ||
from Services.WaterManagementService import calculate_and_store_volume | ||
from Services.WaterManagementService import WaterManagementService | ||
|
||
scheduler_service = SchedulerService() | ||
water_management_service = WaterManagementService() | ||
|
||
scheduler_service = SchedulerService() | ||
|
||
scheduler_service.add_job(calculate_and_store_volume, 'interval', hours=8) # run 3 times a day | ||
scheduler_service.add_job(water_management_service.measure_and_store_volume, 'interval', hours=8) # run 3 times a day |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
from Scheduler.SchedulerClass import SchedulerService | ||
from Services.WeatherStationService import fetch_weather_station_data | ||
from Services.WeatherStationService import WeatherStationService | ||
|
||
weather_station_service = WeatherStationService() | ||
|
||
scheduler_service = SchedulerService() | ||
|
||
scheduler_service.add_job(fetch_weather_station_data, 'interval', minutes=15) | ||
scheduler_service.add_job(weather_station_service.fetch_weather_station_data, 'interval', minutes=15) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
class IWaterManagementService(ABC): | ||
|
||
@abstractmethod | ||
def measure_and_store_volume(self): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
class IWeatherPredictionService(ABC): | ||
|
||
@abstractmethod | ||
def fetch_weather_forecast(self, date): | ||
pass | ||
|
||
@abstractmethod | ||
def fetch_weather_forecast_range(self, start_date, end_date): | ||
pass | ||
|
||
@abstractmethod | ||
def get_weather_forecast_by_date(self, date): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
class IWeatherStationService(ABC): | ||
|
||
@abstractmethod | ||
def fetch_weather_station_data(self): | ||
pass | ||
|
||
@abstractmethod | ||
def handle_partial_json(self, text): | ||
pass | ||
|
||
@abstractmethod | ||
def fetch_weather_data_by_date(self, date_str): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.