Skip to content

Commit 84c5be0

Browse files
committed
feat(toggl): cache the user info in memory
1 parent 30a3f22 commit 84c5be0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

notebooks/toggl-to-harvest.ipynb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,22 @@
8686
"source[\"Task\"] = \"Project Consulting\"\n",
8787
"source[\"Task\"] = source[\"Task\"].astype(\"category\")"
8888
]
89+
},
90+
{
91+
"cell_type": "code",
92+
"execution_count": null,
93+
"metadata": {},
94+
"outputs": [],
95+
"source": [
96+
"# cache of previously seen user information, keyed on email\n",
97+
"USER_INFO = {}\n",
98+
"NOT_FOUND = \"NOT FOUND\"\n",
99+
"\n",
100+
"if USER_INFO_FILE:\n",
101+
" file_info = read_user_info()\n",
102+
" USER_INFO.update(file_info)\n",
103+
" print(f\"User info: {', '.join(USER_INFO.keys())}\")"
104+
]
89105
}
90106
],
91107
"metadata": {

0 commit comments

Comments
 (0)