diff --git a/.github/workflows/hourly-test.yml b/.github/workflows/hourly-test.yml index a36475e..b1bfbce 100644 --- a/.github/workflows/hourly-test.yml +++ b/.github/workflows/hourly-test.yml @@ -1,7 +1,7 @@ name: Hourly test on: schedule: - - cron: "58 0-9,11-23 * * *" # hourly, except at 12:00 UTC (07:00 EST) + - cron: "55 0-9,11-23 * * *" # hourly, except at 12:00 UTC (07:00 EST) jobs: run_tests: @@ -22,5 +22,5 @@ jobs: - name: Curate a poem, and send it to the testserv run: - python scripts/send-poem.py --mode "test" --username "poemsfromtom@gmail.com" --password ${{ secrets.PFT_PW }} --listserv_filename "poems/testserv.csv" + python scripts/send-poem.py --mode "hourly-test" --username "poemsfromtom@gmail.com" --password ${{ secrets.PFT_PW }} --listserv_filename "poems/testserv.csv" --github_repo_name "thomaswmorris.github.io" --github_token ${{ secrets.GH_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/test-on-push.yml b/.github/workflows/test-on-push.yml index d239f3b..123ee43 100644 --- a/.github/workflows/test-on-push.yml +++ b/.github/workflows/test-on-push.yml @@ -20,5 +20,5 @@ jobs: - name: Send poem to myself run: - python scripts/send-poem.py --mode "test" --username "poemsfromtom@gmail.com" --password ${{ secrets.PFT_PW }} --listserv_filename "poems/testserv.csv" + python scripts/send-poem.py --mode "test-on-push" --username "poemsfromtom@gmail.com" --password ${{ secrets.PFT_PW }} --listserv_filename "poems/testserv.csv" --github_repo_name "thomaswmorris.github.io" --github_token ${{ secrets.GH_TOKEN }} --write_to_repo \ No newline at end of file diff --git a/scripts/send-poem.py b/scripts/send-poem.py index 8f45755..a21aa28 100644 --- a/scripts/send-poem.py +++ b/scripts/send-poem.py @@ -50,7 +50,7 @@ delta = datetime.timedelta(hours=1) now = datetime.datetime.now() -if args.mode == "daily": +if args.mode in ["daily", "hourly-test"]: start_time = (now + datetime.timedelta(hours=1)).replace(microsecond=0, second=0, minute=0) else: start_time = (now + datetime.timedelta(minutes=1)).replace(microsecond=0, second=0) @@ -65,7 +65,7 @@ for index, entry in listserv.iterrows(): t = threading.Thread(target=utils.email_thread, kwargs={**thread_kwargs, "recipient": entry.email}) t.start() - ttime.sleep(1e-1) + ttime.sleep(5e-1) if args.write_to_repo: