Skip to content

Commit

Permalink
update dynamodb lock and move logic functions out of lock (#162)
Browse files Browse the repository at this point in the history
Updates dynamodb lock timeout to 45s

Also adding some logging to task update function to try to debug issues
we are seeing there

https://app.asana.com/0/1149418478823393/1206470410132273/f


Pull Request synchronized with [Asana
task](https://app.asana.com/0/0/1206529515761826)
  • Loading branch information
michael-huang87 authored Feb 5, 2024
1 parent 974821c commit 188257f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/asana/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def update_task(
update_task_fields = asana_helpers.extract_task_fields_from_pull_request(
pull_request
)
logger.info(f"Updating task {task_id} with fields: {update_task_fields}")
task = asana_client.get_task(task_id)
new_due_on = (
asana_helpers.today_str()
Expand Down
3 changes: 1 addition & 2 deletions src/dynamodb/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@

@contextmanager
def dynamodb_lock(
lock_name: str, retry_timeout: Optional[timedelta] = timedelta(seconds=20)
lock_name: str, retry_timeout: Optional[timedelta] = timedelta(seconds=45)
):
# TODO: Make this match get-lock-client in the clojure code
lock = lock_client.acquire_lock(
lock_name, sort_key=lock_name, retry_timeout=retry_timeout
)
Expand Down

0 comments on commit 188257f

Please sign in to comment.