Skip to content

Commit

Permalink
removed time from individual scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchell Laferla committed Jul 7, 2023
1 parent b6e4e73 commit 954474c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 69 deletions.
13 changes: 0 additions & 13 deletions monitoring_weekly/weekly_autolinker_100_links_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@
import pandas as pd


## Timer function, adjust in function.json ##
def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()

if mytimer.past_due:
logging.info('The timer is past due!')

logging.info('Python timer trigger function ran at %s', utc_timestamp)

logging.info("Weekly Monday Autolinker 100 Links Audit")


sp = SparkPost(os.environ["SPARKPOST_KEY"])

dir_path = os.getcwd()
Expand Down
17 changes: 2 additions & 15 deletions monitoring_weekly/weekly_insights_brand_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,14 @@
import azure.functions as func
import time

import sqlalchemy.dialects.sqlite
import pandas as pd
from sparkpost import SparkPost
from sqlalchemy import create_engine
from sqlalchemy.dialects.postgresql import insert
import sqlalchemy.dialects.sqlite
import pandas as pd



## Timer function, adjust in function.json ##
def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()

if mytimer.past_due:
logging.info('The timer is past due!')

logging.info('Python timer trigger function ran at %s', utc_timestamp)

logging.info("Weekly Monday Insights Brand Monitoring")


sp = SparkPost(os.environ["SPARKPOST_KEY"])

dir_path = os.getcwd()
Expand Down
13 changes: 0 additions & 13 deletions monitoring_weekly/weekly_new_brand_combos.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,6 @@



def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()

if mytimer.past_due:
logging.info('The timer is past due!')

logging.info('Python timer trigger function ran at %s', utc_timestamp)



logging.info("Weekly Wednesday New Brand Combos")

sp = SparkPost(os.environ["SPARKPOST_KEY"])

dir_path = os.getcwd()
Expand Down
12 changes: 0 additions & 12 deletions monitoring_weekly/weekly_new_store_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@



def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()

if mytimer.past_due:
logging.info('The timer is past due!')

logging.info('Python timer trigger function ran at %s', utc_timestamp)


logging.info("Weekly Monday New Store Monitoring")

sp = SparkPost(os.environ["SPARKPOST_KEY"])

dir_path = os.getcwd()
Expand Down
20 changes: 4 additions & 16 deletions monitoring_weekly/weekly_sama_reporting.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
import datetime
import logging
import os

import azure.functions as func


def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()

if mytimer.past_due:
logging.info('The timer is past due!')

logging.info('Python timer trigger function ran at %s', utc_timestamp)

import pandas as pd
from tabulate import tabulate
from sqlalchemy import create_engine
import os
from sparkpost import SparkPost
from sparkpost.exceptions import SparkPostAPIException

from tabulate import tabulate
import pandas as pd
import azure.functions as func


# Create connection to snowflake db
Expand Down

0 comments on commit 954474c

Please sign in to comment.