chef-boneyard / opscode-pushy-server

Chef Push Jobs Server
https://docs.chef.io/push_jobs.html
Apache License 2.0
16 stars 10 forks source link

Move to Erlang 18 #127

Closed stevendanna closed 8 years ago

stevendanna commented 8 years ago

The more straightforward thing to do might be to use os:timestamp() everywhere. The use of system_time and monotonic_time was based on my reading of the erlang doc here: http://erlang.org/doc/apps/erts/time_correction.html#Dos_and_Donts

stevendanna commented 8 years ago

@dmccown I've moved the use of monotonic_time to os:timestamp as my understanding from reading the code is we probably don't need the monotonic_time guarantees there. I've left the use of system_time(seconds) over os:timestamp() unless you can see a reason to use timestamp() and covert vs getting the value in seconds directly.

stevendanna commented 8 years ago

@dmccown On further thought this morning, I've just done a straight conversion of erlang:now() -> os:timestamp() rather than attempting to use any of the other new APIs, per your recommendation. This should make it more straightforward to hunt down any issues that may arise.

dmccown commented 8 years ago

That sounds reasonable, Campbell should be online before too long and we can vet this change with him. He knows a bit more about erlang timestamps than I do.