Update: 2026-06-30 04:21:34

This commit is contained in:
Hamza-Ayed
2026-06-30 04:21:34 +03:00
parent 0d793fcce1
commit 625df23bfc
7 changed files with 5 additions and 7 deletions

View File

@@ -76,8 +76,8 @@ class ScraperAccessibilityService : AccessibilityService() {
Log.d(TAG, "No tasks available.") Log.d(TAG, "No tasks available.")
} }
} }
// Poll every 15 seconds // Poll every 5 seconds
delay(15000) delay(5000)
} }
} }
} }
@@ -404,11 +404,9 @@ class ScraperAccessibilityService : AccessibilityService() {
val nextResult = workerClient.fetchTask() val nextResult = workerClient.fetchTask()
if (nextResult != null && nextResult.optBoolean("has_task", false)) { if (nextResult != null && nextResult.optBoolean("has_task", false)) {
val nextTask = nextResult.getJSONObject("task") val nextTask = nextResult.getJSONObject("task")
currentTask = nextTask currentState = BotState.IDLE
taxiFPickupDone = false handleTask(nextTask)
taxiFDestinationDone = false Log.i(TAG, "Multi-trip: Immediately started next task ${nextTask.optString("task_id")}")
currentState = BotState.SEARCHING_START
Log.i(TAG, "TaxiF: Multi-trip fetched next task ${nextTask.optString("task_id")}, state -> SEARCHING_START")
} else { } else {
Log.i(TAG, "No more tasks, returning to IDLE.") Log.i(TAG, "No more tasks, returning to IDLE.")
currentState = BotState.IDLE currentState = BotState.IDLE