Skip to content

Commit

Permalink
fix: GitHubTask
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Aug 23, 2021
1 parent dee0330 commit 3084a14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ abstract class GitHubSubscriber<T : LifeCycle>(private val name: String, scope:
}
}

private fun task(id: String) = synchronized(jobs) { tasks[id] }.takeIf { it?.contacts.isNullOrEmpty() }
private fun task(id: String) = synchronized(jobs) { tasks[id] }?.takeIf { it.contacts.isNotEmpty() }

private fun run(id: String) = launch(SupervisorJob()) {
logger.info { "$name with $id run start" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data class GitHubTask(
val contacts: MutableSet<Long> = mutableSetOf(),
@SerialName("last")
@Serializable(OffsetDateTimeSerializer::class)
var last: OffsetDateTime = OffsetDateTime.MIN,
var last: OffsetDateTime = OffsetDateTime.now(),
@SerialName("interval")
var interval: Long = 600_000L
)

0 comments on commit 3084a14

Please sign in to comment.