Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
Merge branch '24/schedule'
Browse files Browse the repository at this point in the history
  • Loading branch information
brew committed May 11, 2017
2 parents 3e46c32 + 08b78b3 commit fc207ba
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions datapackage_pipelines_measure/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from datapackage_pipelines.generators import (
GeneratorBase,
steps,
slugify
slugify,
SCHEDULE_DAILY
)

from . import pipeline_steps
Expand Down Expand Up @@ -47,7 +48,7 @@ def get_schema(cls):
@classmethod
def generate_pipeline(cls, source):
project_id = slugify(source['project'])
schedule = None
schedule = SCHEDULE_DAILY

discovered_steps = cls._get_pipeline_steps()

Expand Down Expand Up @@ -77,6 +78,8 @@ def generate_pipeline(cls, source):
'pipeline': _steps
}
if schedule is not None:
pipeline_details['schedule']['crontab'] = schedule
pipeline_details['schedule'] = {
'crontab': schedule
}

yield pipeline_id, pipeline_details

0 comments on commit fc207ba

Please sign in to comment.