Skip to content

Commit

Permalink
add debug logging, fix scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
imbananko committed Jul 28, 2024
1 parent 2dd4081 commit e1dd50d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ class InstagramReelLinkHandler(
.addParameter("variables", "{\"shortcode\":\"$postId\"}")
.build()

log.debug("Requesting instagram: {}", uri)
val execute = httpClient.execute(HttpGet(uri))
val response = String(execute.entity.content.readAllBytes())
log.debug("Response: {}", response)

val jsonObject = JSONObject(response)
val objectGraphql = jsonObject.getJSONObject("data")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class MemesSchedulers(
}.let { api.executeSuspended(it) }
}

@Scheduled(cron = "0 */1 * * * *")
@Scheduled(cron = "0 */9 4-22 * * *")
fun scheduleForChannel() = runBlocking {
val memes = async { scheduleMemesIfAny() }
val reels = async { scheduleReelsIfAny() }
Expand Down

0 comments on commit e1dd50d

Please sign in to comment.