Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Practically speaking, how would you use these for noting starts and ends of long-running jobs, say?

Would you set the interval starting time, but leave the end of the interval as "present"/infinity? And then update the end of the interval when the job finished? Wouldn't you also need to have a cleanup function to manually "close" intervals if the worker crashed and restarted?



I'm not sure to be honest, I would set the end as infinity I think.

I wouldn't have the worker process handle this itself though, as you would need some form of cleanup. But you'd need the same with two individual columns


Maybe a chosen value such as "2100-01-01 00:00" could work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: