mirror of https://github.com/Hoffelhas/autodoist
Extra logs for sync api
parent
335cb3ae75
commit
0a16de9a10
18
autodoist.py
18
autodoist.py
|
@ -523,7 +523,15 @@ def sync(api):
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.exception(
|
logging.exception(
|
||||||
'Error trying to sync with Todoist API: %s' % str(e))
|
'Error trying to send data through Todoist sync API: %s \n' % str(e))
|
||||||
|
logging.debug(
|
||||||
|
'bearer_token: %s' % bearer_token)
|
||||||
|
logging.debug(
|
||||||
|
'sync_token: %s' % api.sync_token)
|
||||||
|
logging.debug(
|
||||||
|
'commands: %s' % json.dumps(api.queue, indent=2))
|
||||||
|
logging.debug(
|
||||||
|
'response: %s' % json.dumps(response.json(), indent=2))
|
||||||
quit()
|
quit()
|
||||||
|
|
||||||
# Find the type based on name suffix.
|
# Find the type based on name suffix.
|
||||||
|
@ -963,10 +971,10 @@ def find_and_headerify_all_children(api, task, section_tasks, mode):
|
||||||
# content=child_task.content[2:])
|
# content=child_task.content[2:])
|
||||||
# overview_updated_ids.append(child_task.id)
|
# overview_updated_ids.append(child_task.id)
|
||||||
|
|
||||||
find_and_headerify_all_children(
|
api = find_and_headerify_all_children(
|
||||||
api, child_task, section_tasks, mode)
|
api, child_task, section_tasks, mode)
|
||||||
|
|
||||||
return 0
|
return api
|
||||||
|
|
||||||
# Contains all main autodoist functionalities
|
# Contains all main autodoist functionalities
|
||||||
|
|
||||||
|
@ -1435,7 +1443,7 @@ def autodoist_magic(args, api, connection):
|
||||||
first_found[0] = True
|
first_found[0] = True
|
||||||
|
|
||||||
# Return all ids and corresponding labels that need to be modified
|
# Return all ids and corresponding labels that need to be modified
|
||||||
return overview_task_ids, overview_task_labels
|
return api, overview_task_ids, overview_task_labels
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
|
|
||||||
|
@ -1511,7 +1519,7 @@ def main():
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
|
|
||||||
# Evaluate projects, sections, and tasks
|
# Evaluate projects, sections, and tasks
|
||||||
overview_task_ids, overview_task_labels = autodoist_magic(
|
api, overview_task_ids, overview_task_labels = autodoist_magic(
|
||||||
args, api, connection)
|
args, api, connection)
|
||||||
|
|
||||||
# Commit next action label changes
|
# Commit next action label changes
|
||||||
|
|
Loading…
Reference in New Issue