Changeset 194f49c in tailbone


Ignore:
Timestamp:
11/20/2022 07:37:29 PM (2 months ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
a63d7e9
Parents:
922b550
Message:

Add luigi module/class awareness for overnight tasks

Location:
tailbone
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tailbone/templates/luigi/configure.mako

    r922b550 r194f49c  
    3737                        label="Description">
    3838          {{ props.row.description }}
     39        </b-table-column>
     40        <b-table-column field="class_name"
     41                        label="Class Name">
     42          {{ props.row.class_name }}
    3943        </b-table-column>
    4044        <b-table-column field="script"
     
    8084            </b-input>
    8185          </b-field>
    82           <b-field label="Script"
    83                    :type="overnightTaskScript ? null : 'is-danger'">
     86          <b-field label="Module">
     87            <b-input v-model.trim="overnightTaskModule">
     88            </b-input>
     89          </b-field>
     90          <b-field label="Class Name">
     91            <b-input v-model.trim="overnightTaskClass">
     92            </b-input>
     93          </b-field>
     94          <b-field label="Script">
    8495            <b-input v-model.trim="overnightTaskScript">
    8596            </b-input>
     
    97108                    icon-left="save"
    98109                    @click="overnightTaskSave()"
    99                     :disabled="!overnightTaskKey || !overnightTaskDescription || !overnightTaskScript">
     110                    :disabled="!overnightTaskKey || !overnightTaskDescription">
    100111            Save
    101112          </b-button>
     
    271282    ThisPageData.overnightTaskKey = null
    272283    ThisPageData.overnightTaskDescription = null
     284    ThisPageData.overnightTaskModule = null
     285    ThisPageData.overnightTaskClass = null
    273286    ThisPageData.overnightTaskScript = null
    274287    ThisPageData.overnightTaskNotes = null
     
    278291        this.overnightTaskKey = null
    279292        this.overnightTaskDescription = null
     293        this.overnightTaskModule = null
     294        this.overnightTaskClass = null
    280295        this.overnightTaskScript = null
    281296        this.overnightTaskNotes = null
     
    290305        this.overnightTaskKey = task.key
    291306        this.overnightTaskDescription = task.description
     307        this.overnightTaskModule = task.module
     308        this.overnightTaskClass = task.class_name
    292309        this.overnightTaskScript = task.script
    293310        this.overnightTaskNotes = task.notes
     
    298315        this.overnightTask.key = this.overnightTaskKey
    299316        this.overnightTask.description = this.overnightTaskDescription
     317        this.overnightTask.module = this.overnightTaskModule
     318        this.overnightTask.class_name = this.overnightTaskClass
    300319        this.overnightTask.script = this.overnightTaskScript
    301320        this.overnightTask.notes = this.overnightTaskNotes
  • tailbone/views/luigi.py

    r922b550 r194f49c  
    8787
    8888        try:
    89             self.luigi_handler.launch_overnight_task(task, app.yesterday())
     89            self.luigi_handler.launch_overnight_task(task, app.yesterday(),
     90                                                     email_if_empty=True,
     91                                                     wait=False)
    9092        except Exception as error:
    9193            log.warning("failed to launch overnight task: %s", task,
     
    172174                {'name': 'rattail.luigi.overnight.task.{}.description'.format(key),
    173175                 'value': task['description']},
     176                {'name': 'rattail.luigi.overnight.task.{}.module'.format(key),
     177                 'value': task['module']},
     178                {'name': 'rattail.luigi.overnight.task.{}.class_name'.format(key),
     179                 'value': task['class_name']},
    174180                {'name': 'rattail.luigi.overnight.task.{}.script'.format(key),
    175181                 'value': task['script']},
     
    230236                               model.Setting.name.like('rattail.luigi.overnight.task.%.notes'),
    231237                               model.Setting.name.like('rattail.luigi.overnight.%.notes'),
     238                               model.Setting.name.like('rattail.luigi.overnight.task.%.module'),
     239                               model.Setting.name.like('rattail.luigi.overnight.task.%.class_name'),
    232240                               model.Setting.name.like('rattail.luigi.overnight.task.%.script'),
    233241                               model.Setting.name.like('rattail.luigi.overnight.%.script')))\
Note: See TracChangeset for help on using the changeset viewer.