To do: Fine tune my celery processes and add “processes_line_and_bound_selects_closest_vehicle” function to task so my user doesn’t have to wait for it to be processed
What I did: I played around with my program and cleaned up some minor bugs (example: I tried to unpack an object, haha!). I moved my “processes_line_and_bound_selects_closest_vehicle” from being done by my server to celery, since it takes at least 30 seconds to process (it takes that long because I check the vehicle’s geolocation twice to make sure that the vehicle that is closest isn’t actually driving away from my user versus driving towards my user. I had to change my database so I can keep the bound and line for my celery to use, so I had to change all my files that dealt with this process. I did it and ran it!
hm… tried it again… nothing…
Then I looked up support for my celery and it turns out how I am doing my celery hearbeat, there must be only one instance of it. So doing my two task wasn’t going to work. This is a good note- if I’m not similar with a technology I need to look up if it can do what I want instead of assuming.
So I had to go back and change it back – I did think about just reverting my git, but I made changes to my variable names and functions so they can help explain their purpose and functionality. So I took the time and changed my “processes_line_and_bound_selects_closest_vehicle” back to how it was and my database.
Since I felt a little like I didn’t do much, I thought that I should try a run through (since I know I have bugs). I started my rabbit server, celery and my server and test it out. To my wonderful surprise, it worked! My MVP is complete!
My Thoughts/Process: I’m not going to hide it, when I was able to fun through my program – submit my request online and get a text message that I”m 3 blocks close – I cried! It was an amazing feeling. I thought that for sure I messed it up, but no! It worked. I am so excited. I know that I have a lot more work that I want to do, but its an amazing feeling to have something that you thought of, drew plans for and have been working on, to actually exist in the world! I am so happy!