blob: a2b5a7705b0f77272c0753d4d7c4fd02d579127a [file] [log] [blame]
:py:mod:`airflow.providers.amazon.aws.sensors.glacier`
======================================================
.. py:module:: airflow.providers.amazon.aws.sensors.glacier
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.amazon.aws.sensors.glacier.JobStatus
airflow.providers.amazon.aws.sensors.glacier.GlacierJobOperationSensor
.. py:class:: JobStatus
Bases: :py:obj:`enum.Enum`
Glacier jobs description
.. py:attribute:: IN_PROGRESS
:annotation: = InProgress
.. py:attribute:: SUCCEEDED
:annotation: = Succeeded
.. py:class:: GlacierJobOperationSensor(*, aws_conn_id = 'aws_default', vault_name, job_id, poke_interval = 60 * 20, mode = 'reschedule', **kwargs)
Bases: :py:obj:`airflow.sensors.base.BaseSensorOperator`
Glacier sensor for checking job state. This operator runs only in reschedule mode.
.. seealso::
For more information on how to use this sensor, take a look at the guide:
:ref:`howto/sensor:GlacierJobOperationSensor`
:param aws_conn_id: The reference to the AWS connection details
:param vault_name: name of Glacier vault on which job is executed
:param job_id: the job ID was returned by retrieve_inventory()
:param poke_interval: Time in seconds that the job should wait in
between each tries
:param mode: How the sensor operates.
Options are: ``{ poke | reschedule }``, default is ``poke``.
When set to ``poke`` the sensor is taking up a worker slot for its
whole execution time and sleeps between pokes. Use this mode if the
expected runtime of the sensor is short or if a short poke interval
is required. Note that the sensor will hold onto a worker slot and
a pool slot for the duration of the sensor's runtime in this mode.
When set to ``reschedule`` the sensor task frees the worker slot when
the criteria is not yet met and it's rescheduled at a later time. Use
this mode if the time before the criteria is met is expected to be
quite long. The poke interval should be more than one minute to
prevent too much load on the scheduler.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['vault_name', 'job_id']
.. py:method:: poke(self, context)
Function that the sensors defined while deriving this class should
override.