- # the maxmum borrowing time is limited no more than 10 days.
- # case the runtime/sleep value count beyond the limit,
- # it will throw error message and prevent the submit for borrowing machine.
- # runtime value is converted to second.
- max_run_time = 10 * 24 * 3600
- error_msg = "\nMachine borrow time cannot exceed 10 days. Consider re-borrow.\n"
The runtime cannot exceed 10 days in machine borrow. Consider re-borrow.
it is suggested to use the message in the last version.
- raise error_msg if @hash["pp"]["sleep"]["runtime"].as_i > max_run_time
Why not use runtime in top-level?
it is suggested to use the key in 'pp', for it gets the value in 'pp' in the final.
Thanks, Luan Shengde
Thanks, Xueliang
- end
- private def is_valid_account?(account_info) return false unless account_info.is_a?(JSON::Any)
-- 2.23.0