potiuk commented on a change in pull request #7145: [AIRFLOW-6543][AIP-21] 
Promotion of contrib classes to the core
URL: https://github.com/apache/airflow/pull/7145#discussion_r365603475
 
 

 ##########
 File path: airflow/contrib/sensors/file_sensor.py
 ##########
 @@ -16,54 +16,14 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
-
-import os
-from glob import glob
-
-from airflow.contrib.hooks.fs_hook import FSHook
-from airflow.sensors.base_sensor_operator import BaseSensorOperator
-from airflow.utils.decorators import apply_defaults
-
-
-class FileSensor(BaseSensorOperator):
-    """
-    Waits for a file or folder to land in a filesystem.
-
-    If the path given is a directory then this sensor will only return true if
-    any files exist inside it (either directly, or within a subdirectory)
-
-    :param fs_conn_id: reference to the File (path)
-        connection id
-    :type fs_conn_id: str
-    :param filepath: File or folder name (relative to
-        the base path set within the connection), can be a glob.
-    :type fs_conn_id: str
-    """
-    template_fields = ('filepath',)
-    ui_color = '#91818a'
-
-    @apply_defaults
-    def __init__(self,
-                 filepath,
-                 fs_conn_id='fs_default',
-                 *args,
-                 **kwargs):
-        super().__init__(*args, **kwargs)
-        self.filepath = filepath
-        self.fs_conn_id = fs_conn_id
+"""This module is deprecated. Please use `airflow.sensors.fs`."""
 
 Review comment:
   I agree `fs` is rather ambiguous. I missed that one when I looked at the 
spreadsheet. I would rather change it to filesystem. I don't think we need to 
discuss it in devlist if we agree during the PR that it's a better name. That's 
actually name that is still in the AIP-21 (thought it was in providers 
originally).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to