Skip to content

Commit

Permalink
Add changelog for new Timer creation
Browse files Browse the repository at this point in the history
Also fix minor mypy issue.
  • Loading branch information
sirosen committed Oct 27, 2023
1 parent 4437c62 commit 4efb562
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions changelog.d/20231027_012754_sirosen_timers_v2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Added
~~~~~

- Add support for the new Transfer Timer creation method, in the form of a
client method, ``TimerClient.create_timer``, and a payload builder type,
``TransferTimer`` (:pr:`NUMBER`)

- ``create_timer`` only supports dict data and ``TransferTimer``, not the
previous ``TimerJob`` type

- Additional helper classes, ``RecurringTimerSchedule`` and
``OneceTimerSchedule``, are provided to help build the ``TransferTimer``
payload

Deprecated
~~~~~~~~~~

- Creation of timers to run transfers using ``TimerJob`` is now
deprecated (:pr:`NUMBER`)
2 changes: 1 addition & 1 deletion src/globus_sdk/services/timer/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def from_transfer_data(
)


def _format_date(date: str | dt.datetime | MISSING) -> str | MISSING:
def _format_date(date: str | dt.datetime | MissingType) -> str | MissingType:
if isinstance(date, dt.datetime):
return date.astimezone(dt.timezone.utc).replace(microsecond=0).isoformat()
else:
Expand Down

0 comments on commit 4efb562

Please sign in to comment.