From 8fedd932d076700279ffb1556c5968ec165045d5 Mon Sep 17 00:00:00 2001 From: ohiogeek <62385769+ohiogeek@users.noreply.github.com> Date: Thu, 19 Mar 2020 15:58:40 -0400 Subject: [PATCH] Delete tasks.py --- nexusdash/hostnames/tasks.py | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 nexusdash/hostnames/tasks.py diff --git a/nexusdash/hostnames/tasks.py b/nexusdash/hostnames/tasks.py deleted file mode 100644 index 15fa2406..00000000 --- a/nexusdash/hostnames/tasks.py +++ /dev/null @@ -1,24 +0,0 @@ -from __future__ import absolute_import - -from celery import shared_task - -from utils.fetchcliout import fetchcli_wrapper - -@shared_task -def poll_healthinfo(hostname): - ''' - Try connecting to the device and do initial health check - Save hostname entry in HostNames table - - @param hostname: hostname being submitted by post request to add a new device by user - ''' - # The provided input has already been saved by form submission LoginForm.save() - # Updating the entry now... - hostname_obj, fetcho = fetchcli_wrapper(hostname) - hostname_obj.is_healthy = fetcho.is_healthy - hostname_obj.is_online = fetcho.is_online - hostname_obj.os_type = fetcho.sw_version - hostname_obj.error_online = fetcho.error_online - hostname_obj.health_statuses = fetcho.health_statuses - hostname_obj.save() - \ No newline at end of file