Modify DB function to record end time of worker.