Created
July 18, 2018 23:43
-
-
Save alisha/bc0c93376e13b00780652206cf428840 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?hh | |
function workspaces_get_pref_stats_only_admins(workspace_t $workspace): bool { | |
# Logging with a low sample rate | |
if (mt_rand(1, 5000) == 7){ | |
log_event('workspaces_prefs_get', array('pref_name' => 'stats_only_admins')); | |
} | |
$ret = workspaces_prefs_get_single_safe($workspace, 'stats_only_admins'); | |
if ($ret->is_error()) throw new WorkspacePrefFetchException('Workspace pref fetch failure'); | |
return (bool)$ret->get(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment