Skip to content

Commit

Permalink
Merge pull request #90 from vtex-apps/delete-lockfile
Browse files Browse the repository at this point in the history
Delete lockfile
  • Loading branch information
btalma authored Nov 14, 2023
2 parents 9ce4513 + f8be9e6 commit 4202e4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed
- Delete lockfiles

## [1.11.3] - 2023-08-17

### Changed
Expand Down
7 changes: 1 addition & 6 deletions dotnet/Data/AvailabilityRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,8 @@ public async Task<DateTime> CheckImportLock(string sku)

public async Task ClearImportLock(string sku)
{
var processingLock = new Lock
{
ProcessingStarted = new DateTime(),
};

string url = $"http://infra.io.vtex.com/vbase/v2/{this._httpContextAccessor.HttpContext.Request.Headers[Constants.VTEX_ACCOUNT_HEADER_NAME]}/{this._httpContextAccessor.HttpContext.Request.Headers[Constants.HEADER_VTEX_WORKSPACE]}/buckets/{this._applicationName}/{Constants.BUCKET}/files/{Constants.LOCK}-{sku}";
ResponseWrapper responseWrapper = await this.SendRequest(url, HttpMethod.Put, processingLock);
ResponseWrapper responseWrapper = await this.SendRequest(url, HttpMethod.Delete);
if (!responseWrapper.IsSuccess)
{
_context.Vtex.Logger.Error("ClearImportLock", null, $"Failed to clear lock. {responseWrapper.Message} Sku: {sku}");
Expand Down

0 comments on commit 4202e4d

Please sign in to comment.