upsies.jobs.rules
Tracker rules
Classes
- class upsies.jobs.rules.RulesJob(*, home_directory=None, cache_directory=None, cache_id='', ignore_cache=False, no_output_is_ok=False, hidden=False, autostart=True, guaranteed=False, precondition=None, prejobs=(), callbacks={}, **kwargs)[source]
Bases:
JobBaseCheck if a particulare release does not violate tracker rules
This job adds the following signals to
signal:checkingEmitted when a rule is checked. Registered callbacks get the
TrackerRuleBasesubclass as a positional argument.checkedEmitted when a rule was checked. Registered callbacks get the
TrackerRuleBasesubclass and aRuleBrokeninstance or None as positional arguments.
- cache_id = None
- property tracker
Instance of a
TrackerBasesubclass
- property tracker_jobs
Instance of a
TrackerJobsBasesubclass
- property release_name
ReleaseNameinstance
- initialize(*, tracker_jobs, only_warn=False)[source]
Set internal state
- Parameters:
tracker_jobs – Instance of a
TrackerJobsBasesubclassonly_warn (bool) – Exceptions from broken rules are passed to
warn()instead oferror()(i.e. allow submissions with broken rules)
- async run()[source]
Do the work
This method is called by
start(). Its coroutine is passed toadd_task().Any keyword arguments passed to
initialize()are available viakwargs.The job
is_finishedwhen alladded tasksare done or cancelled. (See alsofinalize()andfinalization().)This method may call
add_task()if more tasks are required.