Skip to content

Instantly share code, notes, and snippets.

@mayhem
Created July 19, 2021 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayhem/e220fe9a56e3618deae09a40735648dc to your computer and use it in GitHub Desktop.
Save mayhem/e220fe9a56e3618deae09a40735648dc to your computer and use it in GitHub Desktop.
start = datetime.now()
ls.dump_listens_for_spark("/tmp", 1000)
print("Finished dumping full dump, starting incremental dump")
inc_start = datetime.now()
ls.dump_listens_for_spark("/tmp", 1001, start)
print("Waiting 60 seconds, starting new incremental dump")
# collect more listens
sleep(60)
ls.dump_listens_for_spark("/tmp", 1002, inc_start)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment