Extracting weed into cooking oil smells a good bit especially because you have to let it simmer for 45 minutes or so. I'd imagine if you were done by like 4:30 it would be fine. Keeping a window open or exhaust fan on while you cook may keep you perfectly safe.

After cooking the goods will keep as long as the food is good. Eating weed is a nice way to enjoy it.