Remove debug code
This commit is contained in:
parent
99da8d56d5
commit
66693289ed
@ -274,11 +274,6 @@
|
|||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (nullable void (^)(id _Nullable jsonObject, MVMCoreErrorObject *_Nullable error))modifyRequestFinished:(nullable void (^)(id _Nullable jsonObject, MVMCoreErrorObject *_Nullable error))requestFinished {
|
|
||||||
return requestFinished;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// MAKE SWIFTY
|
|
||||||
- (void)sendRequest:(nonnull MVMCoreRequestParameters *)requestParameters locationForError:(nonnull NSString *)locationForError requestFinished:(nullable void (^)(id _Nullable jsonObject, MVMCoreErrorObject *_Nullable error))requestFinished {
|
- (void)sendRequest:(nonnull MVMCoreRequestParameters *)requestParameters locationForError:(nonnull NSString *)locationForError requestFinished:(nullable void (^)(id _Nullable jsonObject, MVMCoreErrorObject *_Nullable error))requestFinished {
|
||||||
[self transformToRequestWithParameters:requestParameters closure:^(NSURLRequest * _Nullable request, MVMCoreErrorObject * _Nullable error) {
|
[self transformToRequestWithParameters:requestParameters closure:^(NSURLRequest * _Nullable request, MVMCoreErrorObject * _Nullable error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|||||||
@ -34,26 +34,21 @@ public extension MVMCoreActionUtility {
|
|||||||
// Task for operation.
|
// Task for operation.
|
||||||
group.addTask {
|
group.addTask {
|
||||||
try Task.checkCancellation()
|
try Task.checkCancellation()
|
||||||
let id = try await operation()
|
return try await operation()
|
||||||
print("sss 1")
|
|
||||||
return id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Task for time out.
|
// Task for time out.
|
||||||
group.addTask {
|
group.addTask {
|
||||||
try Task.checkCancellation()
|
try Task.checkCancellation()
|
||||||
try await Task.sleep(nanoseconds: UInt64(timeout) * NSEC_PER_SEC)
|
try await Task.sleep(nanoseconds: UInt64(timeout) * NSEC_PER_SEC)
|
||||||
print("sss 2")
|
|
||||||
throw MVMCoreActionUtilityError.timeOut
|
throw MVMCoreActionUtilityError.timeOut
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
guard let result = try await group.next() else {
|
guard let result = try await group.next() else {
|
||||||
print("sss no task")
|
|
||||||
continuation.resume(throwing: MVMCoreActionUtilityError.noTasks)
|
continuation.resume(throwing: MVMCoreActionUtilityError.noTasks)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
print("sss next \(String(describing: result))")
|
|
||||||
group.cancelAll()
|
group.cancelAll()
|
||||||
continuation.resume(returning: result)
|
continuation.resume(returning: result)
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user