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
Showing
5 changed files
with
23 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ shapefiles/ | |
openrural/settings/local.py | ||
*.DS_Store | ||
.vagrant | ||
*.swp |
Empty file.
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,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
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,18 @@ | ||
from celery.task import Task, PeriodicTask | ||
from celery.registry import tasks | ||
from datetime import timedelta | ||
|
||
from ebpub.db.bin.update_aggregates import update_all_aggregates | ||
|
||
class AggregatesTask(PeriodicTask): | ||
|
||
name = 'openrural.aggregates' | ||
run_every = timedelta(hours=12) | ||
|
||
def run(self, dry_run=False, reset=False): | ||
logger = self.get_logger() | ||
logger.info("Starting aggregates task") | ||
update_all_aggregates(dry_run, reset) | ||
logger.info("Stopping aggregates task") | ||
|
||
tasks.register(AggregatesTask) |
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