-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path__init__.py
41 lines (32 loc) · 1.28 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""Provides tasks for downloading data from the museum system, go~mus."""
import luigi
from .bookings import BookingsToDb
from .capacities import CapacitiesToDb
from .customers import CustomersToDb, GomusToCustomerMappingToDb
from .daily_entries import DailyEntriesToDb, ExpectedDailyEntriesToDb
from .exhibitions import ExhibitionTimesToDb
from .events import EventsToDb
# WORKAROUND: disabled for now while running it manually
# from .order_contains import OrderContainsToDb
from .orders import OrdersToDb
from .quotas import QuotasToDb
class GomusToDb(luigi.WrapperTask):
light_mode = luigi.BoolParameter(
description=("If enabled, expensive tasks won't be run"
" (activate this when the go~mus servers have stress)"),
default=False
)
def requires(self):
yield DailyEntriesToDb()
yield ExhibitionTimesToDb()
yield ExpectedDailyEntriesToDb()
if not self.light_mode:
yield BookingsToDb()
yield CustomersToDb()
yield EventsToDb()
yield GomusToCustomerMappingToDb()
# WORKAROUND: disabled for now while running it manually
# yield OrderContainsToDb()
yield OrdersToDb()
yield CapacitiesToDb()
yield QuotasToDb()