minor changes#1
minor changes#1slicefox wants to merge 1 commit intovishalanandl177:masterfrom slicefox:minor-changes
Conversation
|
added_on = models.DateTimeField(auto_now_add=True) We have a queue implementation to hold the logs before inserting into the database or it waits for a period of time to let the queue to be filled. If queue is full then only it inserts into the database. So I added timezone aware datetime object in log before adding into the queue. This is the actual time of API call. If "auto_now_add" is sets to True, It ignores the date passed explicitly to DateTimeField. You can check here https://code.djangoproject.com/ticket/16583. If we use "auto_now_add=True" and Logs are inserted after some seconds, It will use Insertion time in "added_on" field. This will be wrong information and it is going to create a problem in debugging. |
|
Yeah, I did't consider at that aspect. Current Implementation makes sense. |
Minor changes