Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TeamPrinterV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aleksandr
TeamPrinterV2
Commits
48061c77
Commit
48061c77
authored
Jul 25, 2024
by
Aleksandr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed passing the last rendered progress event
parent
165cbcb3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
feature/job_sender/src/main/java/com/isidroid/job_sender/SendJobEventCollectorFlow.kt
+1
-1
feature/job_sender/src/main/java/com/isidroid/job_sender/domain/dto/JobSenderResult.kt
+2
-1
feature/job_sender/src/main/java/com/isidroid/job_sender/repository/JobSendRepositoryImpl.kt
+2
-0
No files found.
feature/job_sender/src/main/java/com/isidroid/job_sender/SendJobEventCollectorFlow.kt
View file @
48061c77
...
@@ -17,7 +17,7 @@ class SendJobEventCollectorFlow @Inject constructor() {
...
@@ -17,7 +17,7 @@ class SendJobEventCollectorFlow @Inject constructor() {
.
also
{
Timber
.
i
(
"call: $result"
)
}
.
also
{
Timber
.
i
(
"call: $result"
)
}
suspend
fun
renderProgress
(
jobId
:
String
,
index
:
Int
,
total
:
Int
)
=
emit
(
JobSenderResult
.
RenderProgress
(
jobId
,
index
,
total
))
suspend
fun
renderProgress
(
jobId
:
String
,
index
:
Int
,
total
:
Int
)
=
emit
(
JobSenderResult
.
RenderProgress
(
jobId
,
index
,
total
))
suspend
fun
uploadProgress
(
jobId
:
String
,
index
:
Int
,
total
:
Int
)
=
emit
(
JobSenderResult
.
UploadProgress
(
jobId
,
index
,
total
))
suspend
fun
uploadProgress
(
jobId
:
String
?
,
index
:
Int
,
total
:
Int
)
=
emit
(
JobSenderResult
.
UploadProgress
(
jobId
,
index
,
total
))
suspend
fun
jobError
(
jobId
:
String
,
t
:
Throwable
)
=
emit
(
JobSenderResult
.
Error
(
jobId
,
t
))
suspend
fun
jobError
(
jobId
:
String
,
t
:
Throwable
)
=
emit
(
JobSenderResult
.
Error
(
jobId
,
t
))
suspend
fun
updateStatus
(
@JobStatus
status
:
Int
,
vararg
jobIds
:
String
?)
=
emit
(
JobSenderResult
.
Statuses
(
status
=
status
,
jobIds
=
jobIds
.
toSet
()))
suspend
fun
updateStatus
(
@JobStatus
status
:
Int
,
vararg
jobIds
:
String
?)
=
emit
(
JobSenderResult
.
Statuses
(
status
=
status
,
jobIds
=
jobIds
.
toSet
()))
...
...
feature/job_sender/src/main/java/com/isidroid/job_sender/domain/dto/JobSenderResult.kt
View file @
48061c77
...
@@ -4,7 +4,7 @@ import com.isidroid.job.constant.JobStatus
...
@@ -4,7 +4,7 @@ import com.isidroid.job.constant.JobStatus
sealed
interface
JobSenderResult
{
sealed
interface
JobSenderResult
{
data class
RenderProgress
(
val
jobId
:
String
,
val
position
:
Int
,
val
total
:
Int
)
:
JobSenderResult
data class
RenderProgress
(
val
jobId
:
String
,
val
position
:
Int
,
val
total
:
Int
)
:
JobSenderResult
data class
UploadProgress
(
val
jobId
:
String
,
val
position
:
Int
,
val
total
:
Int
)
:
JobSenderResult
data class
UploadProgress
(
val
jobId
:
String
?
,
val
position
:
Int
,
val
total
:
Int
)
:
JobSenderResult
data class
Error
(
val
jobId
:
String
,
val
t
:
Throwable
)
:
JobSenderResult
data class
Error
(
val
jobId
:
String
,
val
t
:
Throwable
)
:
JobSenderResult
data class
Statuses
(
@JobStatus
val
status
:
Int
,
val
jobIds
:
Collection
<
String
?>)
:
JobSenderResult
data class
Statuses
(
@JobStatus
val
status
:
Int
,
val
jobIds
:
Collection
<
String
?>)
:
JobSenderResult
}
}
\ No newline at end of file
feature/job_sender/src/main/java/com/isidroid/job_sender/repository/JobSendRepositoryImpl.kt
View file @
48061c77
...
@@ -82,6 +82,8 @@ internal class JobSendRepositoryImpl(
...
@@ -82,6 +82,8 @@ internal class JobSendRepositoryImpl(
}
}
}
}
eventCollector
.
uploadProgress
(
null
,
total
,
total
)
// update jobs
// update jobs
val
successJobIds
=
sendJobResults
.
filter
{
it
.
value
==
0
}.
keys
val
successJobIds
=
sendJobResults
.
filter
{
it
.
value
==
0
}.
keys
printJobRepository
.
updateJobStatus
(
status
=
JobStatus
.
RENDER_UPLOAD
,
*
successJobIds
.
toTypedArray
())
printJobRepository
.
updateJobStatus
(
status
=
JobStatus
.
RENDER_UPLOAD
,
*
successJobIds
.
toTypedArray
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment