automation: run some jobs less frequently
This commit is contained in:
parent
d54fae7423
commit
d7091ead5a
3 changed files with 3 additions and 0 deletions
|
@ -25,6 +25,7 @@ def set_http_alarm(proxy_id: int, state: AlarmState, text: str):
|
|||
class AlarmProxyHTTPStatusAutomation(BaseAutomation):
|
||||
short_name = "alarm_http_status"
|
||||
description = "Check all deployed proxies for HTTP status code"
|
||||
frequency = 45
|
||||
|
||||
def automate(self, full: bool = False) -> Tuple[bool, str]:
|
||||
proxies = Proxy.query.filter(
|
||||
|
|
|
@ -13,6 +13,7 @@ from app.terraform import BaseAutomation
|
|||
class BlockBridgeGitHubAutomation(BaseAutomation):
|
||||
short_name = "block_bridge_github"
|
||||
description = "Import bridge reachability results from GitHub"
|
||||
frequency = 30
|
||||
|
||||
def automate(self, full: bool = False) -> Tuple[bool, str]:
|
||||
g = Github(app.config['GITHUB_API_KEY'])
|
||||
|
|
|
@ -75,6 +75,7 @@ def set_ooni_alarm(origin_id: int, country: str, state: AlarmState, text: str):
|
|||
class BlockOONIAutomation(BaseAutomation):
|
||||
short_name = "block_ooni"
|
||||
description = "Import origin and/or proxy reachability results from OONI"
|
||||
frequency = 240
|
||||
|
||||
def automate(self, full: bool = False) -> Tuple[bool, str]:
|
||||
origins = Origin.query.filter(Origin.destroyed == None).all()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue