| |
@@ -507,6 +507,11 @@
|
| |
log.error("There was an error creating issue: %s" % ex)
|
| |
|
| |
|
| |
+ def heartbeat():
|
| |
+ p = pathlib.Path('/var/clean_amis_monitor_file')
|
| |
+ p.touch()
|
| |
+
|
| |
+
|
| |
if __name__ == "__main__":
|
| |
argument_parser = argparse.ArgumentParser()
|
| |
argument_parser.add_argument(
|
| |
@@ -593,3 +598,5 @@
|
| |
deleted_amis = delete_amis_nd(deletetimestamp, dry_run=args.dry_run)
|
| |
if not args.dry_run:
|
| |
generate_report_delete(deleted_amis)
|
| |
+
|
| |
+ heartbeat()
|
| |
So, I'm planning add a monitor to this cron job so that we know when this script stops running. Absence of this would accumulate the AMIs which in-turn would increase the AMI bills.
Signed-off-by: Sayan Chowdhury sayan.chowdhury2012@gmail.com