Пример #1
0
 def save_event(self, event):
     Database.create_event_prod(start=event.start,
                                end=event.end,
                                p_type=event.type_event,
                                info=event.info,
                                ensemble=event.ensemble)
     from gestion.stores.event_store import event_store
     event_store.update()
     self.SETTINGS_CHANGED_SIGNAL.emit()
Пример #2
0
 def add_defaut_stop_prod(self):
     day_ago = settings_store_gestion.day_ago
     start_defaut_stop_prod = timestamp_at_time(
         timestamp_at_day_ago(day_ago), hours=FIN_PROD_SOIR_VENDREDI)
     end_defaut_stop_prod = timestamp_at_time(timestamp_at_day_ago(day_ago),
                                              hours=FIN_PROD_SOIR)
     Database.create_event_prod(start=start_defaut_stop_prod,
                                end=end_defaut_stop_prod,
                                p_type="stop")
     self.update()